Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Femme Stab Mode >:D on Thu 12/06/2003 10:27:17

Title: Character won't move to a different room!
Post by: Femme Stab Mode >:D on Thu 12/06/2003 10:27:17
Iteract hospot
player- go to a different room (at specific co-ordinates) (8,130,190)
I got this programed in but the character just moves to the specified location in te room that it;s in, which is 3. I tried renaming rooms but that didn't help. What the hell is happening?
Title: Re:Character won't move to a different room!
Post by: danny* on Thu 12/06/2003 11:54:25
you mean that you script this: NewRoomEx(3,130,190);
and it's not working?
(and since you want your char. to move to room 3,what is this 8 doing there?)
Title: Re:Character won't move to a different room!
Post by: Femme Stab Mode >:D on Fri 13/06/2003 03:39:28
No, I want the character to move FROM room 3 to room 8. I didn't use NewRoom command I just selected that from a drop down list and put in the values.
Title: Re:Character won't move to a different room!
Post by: evilspacefart on Fri 13/06/2003 06:56:28
I remember asking this same question once.
Here goes:

character[CHARID].room = 8;
character[CHARID].x = 130;
character[CHARID].y = 190;

CHARID can be the script name of the character you want to move. ie, ROGER, EGO...
Title: Re:Character won't move to a different room!
Post by: Gilbert on Fri 13/06/2003 08:26:51
Hmmm in that case I think there may be a bug in the engine, though I don't have enough info for that.

Was the character the initial one the game started in or it had been changed somewhere (via SetPlayerCharacter()?), I'm afraid of *something*.
Title: Re:Character won't move to a different room!
Post by: spook1 on Fri 13/06/2003 18:40:10
Imho I think that using NewRoomEx(roomnuber, x-coordinate, y-coordinate) is the clearest command to go to a new room. This way you can control the whole room-transition.
You can program such a thing by selcting from the dropdown menu: runscript.
The click "edit script" and type in the script:

NewRoomEx(8, x-coordinate, y-coordinate)

Note: topleft of your window is 0,0

I had trouble with the dropdown command also, not knowing exactly where the character will show up.