Graphics, Characters, Text & Rooms: Difference between revisions

*>SSH
(→‎Creating your own characters: updated AGS file formats)
*>SSH
Line 115: Line 115:
''My character is going from one room to the next, and he isn't landing on a walkable area, OR he's popping up in weird places. What's wrong?''
''My character is going from one room to the next, and he isn't landing on a walkable area, OR he's popping up in weird places. What's wrong?''


You're probably not specifying the exact coordinates that the character will start on in the new room. There are several ways to do this, but one easy way is to just call '''NewRoomEx()''' (or '''cEgo.ChangeRoom()''' for AGS V2.7 and above) when the character walks off the screen edge or stands on a region. Consult the manual for more details.
You're probably not specifying the exact coordinates that the character will start on in the new room. There are several ways to do this, but one easy way is to just call '''NewRoomEx()''' (or '''cEgo.ChangeRoom()''' for AGS V2.7 and above) when the character walks off the screen edge or stands on a region.  
 
Another way is to set up the ''Player enters room (before fadein)'' interaction in the new room to check player.PreviousRoom to see which room they just came from and set their x and y coordinates appropriately. This can also be done in the global script in the on_event function if you check for the room entering event and the current and previosu rooms.


==Character does not walk on any walkable areas==
==Character does not walk on any walkable areas==
Anonymous user