|
Post by Xenith on Mar 26, 2004 17:53:51 GMT -5
okay i know how to make it so you can move from room to room but i'm not sure if its the way everybody else does it what i do is make an object right before the door or something and i put in the code to make him move into a specific room but that would mean for every door i make i have to make a similar object so is there an easier way of doing this?
|
|
|
Post by IsmAvatar on Mar 30, 2004 16:13:44 GMT -5
I make 1 object for the room thingies. I have in their collision event with player (or whatever triggers them) room_goto(myroom)
now, after I place it in the room, I hold CTRL, and right-click it, and then I choose the Creation Code. In there, I tell it myroom = room1
|
|
|
Post by hamalnamal on Apr 4, 2004 20:01:40 GMT -5
thats awsome, is there anything else u can do that with?
|
|
|
Post by IsmAvatar on Apr 5, 2004 13:31:13 GMT -5
Creation code? All objects have creation code. Rooms have creation code (found in the room settings), but it's executed after object creation events.
|
|
|
Post by bpdenny on Apr 7, 2004 4:45:30 GMT -5
Wait, IsmAvatar , so does that mean you're changing the creation code for just that instance? Wish I coulda known that, I created a seperate object for each in-out in avataRPG!
|
|
|
Post by IsmAvatar on Apr 7, 2004 12:15:38 GMT -5
yes, it gives the create event to only that instance.
|
|
|
Post by Xenith on Apr 18, 2004 21:17:40 GMT -5
okay thats sweet. then would that work for other things like for dialogue?
|
|
|
Post by Antman on Apr 19, 2004 12:19:33 GMT -5
Yep, you could put any code you wanted in there, and it would only apply to that instance. It allows you to do things like create generic NPC's, and make them have different appearances and dialogue speech while only having one NPC object.
|
|
|
Post by Xenith on Apr 24, 2004 22:26:53 GMT -5
how do i set the coordinates of where he'll appear in the next room?
|
|
|
Post by IsmAvatar on Apr 25, 2004 12:09:26 GMT -5
Is he persistent?
If so, here's how.
in room start event x = global.nextx y = global.nexty
and there's a number of ways for how to determine his next x and y. 1 is in room end event, another is by checking what room it is, another is right when you leave the room using room_goto(room) set it right before you call that. global.nextx = 10 global.nexty = 50
or
if room = room1 { x = 10 y = 50 }
or
(Detecting room boundaries)
if y <= 0 { global.nextx = x global.nexty = 464 } if y >= 480 { global.nextx = x global.nexty = 16 } if x <= 0 { global.nextx = 624 global.nexty = y } if x >= 640 { global.nextx = 16 global.nexty = y }
|
|
|
Post by Xenith on Apr 25, 2004 14:10:31 GMT -5
do i have to make another instance of the character and put him in the room or does he teleport there?
|
|
|
Post by IsmAvatar on Apr 25, 2004 15:46:51 GMT -5
if he's persistent, he should just teleport there.
|
|
|
Post by Xenith on Jun 30, 2004 14:56:48 GMT -5
how do i stop him from going to some rooms, like a menu room? cuz when i open a menu he teleports there
|
|
|
Post by IsmAvatar on Jun 30, 2004 22:16:52 GMT -5
well, you can deactivate him.
if room = rm_menu { instance_deactivate_object(id) }
just as long as you don't forget to activate him again once the room is done.
|
|
|
Post by bobop on Jul 21, 2004 12:09:27 GMT -5
you put that all in the creation code?
|
|