Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: He-Man on Tue 24/08/2004 21:18:38

Title: Strang problem with stairs [Solved]
Post by: He-Man on Tue 24/08/2004 21:18:38
This might be too simple for this forum, but the forum rules says scripting help...

Anyway, In my game the EGO must go down a stair case in back of the room. I have a region just inside the opening where the stairs start. It has this script:

SetWalkBehindBase (2,300);
MoveCharacterDirect (EGO,200,168);
while (character [EGO].walking) AnimateCharacter (EGO,3,3,0);
Wait (40);
NewRoomEx (7,256,117);Ã, 

The walkbehind is located just where the floor stops. Now I want the EGO toÃ,  move down (behind the walkbehind) but keep animating like he's walking up.
The problem is that the EGO doesn't move. He just animate with out moving down.
Please help me out here...
Title: Re: Strang problem with stairs
Post by: Ashen on Tue 24/08/2004 21:32:33
I don't know if I totally understand the question, but if I do the way to sort it would be to create a new view using walking up sprites in the down loop (loop 0), and set EGO's view to that for this walk, e.g.:

SetWalkBehindBase (2,300);
SetCharacterView (EGO, 4); // where 4 is the 'reversed' view
MoveCharacterBlocking (EGO,200,168,1);
ReleaseCharacterView (EGO);
NewRoomEx (7,256,117); 

Does that make sense? Am I close to what you wanted? Hopefully it's some use, anyway.
Title: Re: Strang problem with stairs
Post by: He-Man on Tue 24/08/2004 22:27:25
Thanks a lot! That did the trick!
I don't why I didn't think of that before...