I have a piece of code in my program that is meant to control animations of the main character via variables. This allows me to skip the Play Object command that for some reason doesn't work for my code at all. A continuous Loop Object command controlled by these range variables that change depending on events throughout the program works great. However, I reached this part of the code, and the last if-endif command does not recognize that the object frame has reached the end of that particular animation, which makes the animation loop continuously without resetting the variable controlling it. Here's the snippet, and a quick legend to explain a few things:
Legend:
Object 1 is the character animated with a sword sheathed.
Object 4 is the character animated with a sword unsheathed.
The unsheathing animation is split into the two different objects' animation; one with the character reaching for the sword (Object 1), and the other pulling the sword out(Object 4).
Rem Unsheathing
If Unshea1=1
animspeed1#=150
lpsb#=320
lpse#=331
If Object frame(1)>329 and object frame(1)<331
Unshea1=0
endif
Endif
If Unshea2=1
animspeed2#=150
lpub#=0
lpue#=41
If Object frame(4)>39 and object frame(4)<41
Unshea2=0
endif
Endif
Set object speed 1,animspeed1#
Set object speed 4,animspeed2#
Loop object 1,lpsb#,lpse#
Loop object 4,lpub#,lpue#
Please Help!
Wo!