Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Flippy_D on Mon 04/08/2003 23:24:57

Title: Some considerable difficulty regarding animations and room changes
Post by: Flippy_D on Mon 04/08/2003 23:24:57
Basically, I want the following scenario:

Player interacts with object. EGO moves to object, animation runs on object. Animation runs on player (at one point there will be two animations running), player moves to a different room, but not before the animation finishes. The object number is 1. From a very similar scenario earlier in the game, I have this script... it's near perfect, but I haven't the sufficient knowledge to change some of the variables (it wasn't done by me).

Quote// script for object2: Interact object
MoveCharacterBlocking(EGO, 82, 147, 1);
ObjectOn(0);
SetObjectView(0, 5);
character[EGO].loop=0;
character[EGO].frame=0;
AnimateObject (0, 0, 5, 0);
SetCharacterView(EGO, 6);
AnimateCharacter(EGO, 0, 3, 0);

while (IsObjectAnimating(0)==1){Wait(1);}
NewRoomEx(2, 125, 122);
ReleaseCharacterView(EGO);  

Any help is gratefully accepted.
Title: Re:Some considerable difficulty regarding animations and room changes
Post by: Pumaman on Tue 05/08/2003 19:37:01
// script for object2: Interact object
MoveCharacterBlocking(EGO, 82, 147, 1);
ObjectOn(1);
SetObjectView(1, 5);
character[EGO].loop=0;
character[EGO].frame=0;
AnimateObject (1, 0, 5, 0);
SetCharacterView(EGO, 6);
AnimateCharacter(EGO, 0, 3, 0);

while (IsObjectAnimating(1)==1){Wait(1);}
NewRoomEx(2, 125, 122);
ReleaseCharacterView(EGO);  



It's hard to know what more help you want with it. I recommend looking up each of those commands in the manual so that you can see what each of the parameters means, that should give you an idea about what to change.
Title: Re:Some considerable difficulty regarding animations and room changes
Post by: Flippy_D on Tue 05/08/2003 20:16:16
Alright, thanks.