I'm trying to have an object animated continuously using a view with loops set to run one after the other.
After the animation runs through all the loops I get this:
Quote
An error has occurred. Please contact the game author for support, as this is likely to be a scripting error and not a bug in AGS. (ACI version 3.21.1115)
Error: Last loop in a view requested to move to next loop
The view contains 8 loops, each with 16 frames.
In the view editor all "Run the next loop after this to make a long animation" boxes (for the first 7 loops) are checked.
The animation is set to start in room_FirstLoad and room_Load; thus only once after the room is entered. The use of both room functions has to do with implementing different scenes using a single room. The error is not related to changing the room/scene; without any commands from the user, after the animation runs through all the loops - I get the error.
The code used to start the animation is this:
objectName.SetPosition(object_x, object_y);
objectName.SetView(object_view);
objectName.Animate(0, 10, eRepeat, eNoBlock, eForwards);
where
object_x, object_y and object_view have been predefined using room constants and static variables; the animation runs as expected until reaching the end of the last loop.
Please advise
Nevermind. I made my own Animate-like function and it works fine; especially for me since I like to have greater control over what happens in my programs (but, for the record, I do admire the benefits for pure adventure games offered by the predefined classes). You knew this was going to happen, didn't you?