animations in another room

Started by dude_r005, Mon 13/11/2006 02:20:43

Previous topic - Next topic

dude_r005

hi folks,
I've got a little question again. My character I is in (let's say) room1.While he's there I want an animation in a different room (f.e. room2) to be activated and be shown to the player (human). after that the "view" shall return to the player.

I tried to realize this by letting the character walk to the room and set the him invisible in that room. On character enters screen (after fadein) I let the animation start. This worked so far.

Code: ags

player.Walk(61,131, eBlock, eWalkableAreas);
player.Say("message1");
player.ChangeRoom(15); //<--at this point of actions the "view" should change
player.LockView(16);
player.Animate(0,12,eOnce,eBlock);  
ReleaseCharacterView (EGO); //old code
object[3].SetView(15);
object[3].Animate(0,1,eRepeat,eNoBlock);
player.Say("message2");


but when I do this the player.ChangeRoom-command got skipped and will be executed after the whole code.
This actually makes sense, but it's not what I want.
Is there a different way?? I hope you now what I mean. can anybody help?
???

Gilbert

It's because by design some actions like room changing or starting a dialog will only be executed at the very last of a script, so no matter how you arrange your codes in order these actions will always be executed when the script is about to end.
Moreover, actions that take place in room2 must be scripted in that room, you can't tell the engine to do something directly in say, room2 if the instructions are in the script of room1 (this module may be a workaround for some of these restrictions though).

One simple solution to your problem, is to move the lines below the room changing line to the "Player enters room" script of room2.

dude_r005

I'm not sure how to realize this. Are you sure that the effect would be the same?
Once again, I was trying to let an animtion in another room play while my character is idle.

Pretty much like in ZackMcKracken: The character walks out of the appartement-->the screen gets dark-->Text appears "meanwhile..." --> action in a very different room takes place-->the "view" returns

Khris

Quote from: Gilbot V7000a on Mon 13/11/2006 05:17:30One simple solution to your problem, is to move the lines below the room changing line to the "Player enters room" script of room2.
Did you try that?

SMF spam blocked by CleanTalk