Greetings :D
Simply put, how would i script a new room to load once my object has finished it's animation view/loop?
heres the object and animation in question -
SetObjectView(1,22);
AnimateObject(1,0,3,0);
thanks :D
EDIT -
Tried this to no avail
while (IsObjectAnimating(1)==0) NewRoom(9);
Why not put in a wait command with as many game cycles that the animation takes to go after the animate call, and then do newroom?
The code should read this:
SetObjectView(1,22);
AnimateObject(1,0,3,0);
while (IsObjectAnimating(1)) {
Wait(1);
}
NewRoom(9);
Quote from: Archangel on Wed 18/06/2003 20:51:34
The code should read this:
SetObjectView(1,22);
AnimateObject(1,0,3,0);
while (IsObjectAnimating(1)) {
Wait(1);
}
NewRoom(9);
Yes, because other wise the game would be trying to change rooms every single time it checks to see if the object is animating, which is usually 40 times per second, unless changed.
Thanks people,
I often avoid using wait, sinse my comp is a mediocre chunk of shyte Wait(40) which is equal to 1 second can often be around 6 seconds, hard to keep things in sync. Anyways ill try the code, Cheers ;)
- Yup all workies :D thanks again
The other code may work but you were close with your original one
This is how it works
while (IsObjectAnimating(1)==1) Wait(1);
NewRoom(9);
it will wait till the animation completes and then go to the new room