Here's my "water changes animation direction according to wind"-code
For some reason, everything calculates correctly, but once the new animation has been triggered; the "always set speed"-event seems to stop functioning.
In other words, values change as I would expect, and animation changes correctly according to debugger. But it then fails to gain any speed, even though it's an always function that dictates the speed.
And no, I did not forget to turn looping animations on in animation editor.
----------------------------------------------------------------------------
* NOT River Deep Small animation Western Wind is playing
+ NOT River Deep Small animation Eastern Wind is playing
+ River Deep Small: Eastern Wind is on
River Deep Small : Set Current Animation to -1
* NOT River Deep Small animation Western Wind is playing
+ NOT River Deep Small animation Eastern Wind is playing
+ River Deep Small: Western Wind is on
River Deep Small : Set Current Animation to 1
* Current Animation of River Deep Small = -1
River Deep Small : Change animation sequence to Eastern Wind
* Current Animation of River Deep Small = 1
River Deep Small : Change animation sequence to Western Wind
// Engine
* Always
River Deep Small : Set Animation memory to Image( "River Deep Small" )
River Deep Small : Change speed of animation to Animation Spd( "River Deep Small" )
// Wind direction
* Wind Amount > 0
River Deep Small : Set Western Wind on
River Deep Small : Set Eastern Wind off
* Wind Amount < 0
River Deep Small : Set Eastern Wind on
River Deep Small : Set Western Wind off
// Change diretion states
* Current Animation of River Deep Small = -1
+ River Deep Small: Western Wind is on
River Deep Small : Set Change direction on
* Current Animation of River Deep Small = 1
+ River Deep Small: Eastern Wind is on
River Deep Small : Set Change direction on
* Current Animation of River Deep Small = -1
+ River Deep Small: Eastern Wind is on
River Deep Small : Set Change direction off
* Current Animation of River Deep Small = 1
+ River Deep Small: Western Wind is on
River Deep Small : Set Change direction off
// Select new wind direction
// Set new animation to maximum (or minimum) +/- current frame value to sync up frames on animation change
* Current Animation of River Deep Small = -1
+ Animation Spd of River Deep Small = 0
+ River Deep Small: Western Wind is on
River Deep Small : Set Current Animation to 1
River Deep Small : Force animation frame to 63 - Animation memory( "River Deep Small" )
* Current Animation of River Deep Small = 1
+ Animation Spd of River Deep Small = 0
+ River Deep Small: Eastern Wind is on
River Deep Small : Set Current Animation to -1
River Deep Small : Force animation frame to 0 + Animation memory( "River Deep Small" )
// Force change direction
* River Deep Small: Change direction is on
+ Every 00''-20
River Deep Small : Add -1 to Animation Spd
// Animation Speed
* River Deep Small: Change direction is off
+ Animation Spd of River Deep Small < Abs(Wind Amount)
+ Every Round(500 - Abs(Wind Amount * 10))
River Deep Small : Add 1 to Animation Spd
* River Deep Small: Change direction is off
+ Animation Spd of River Deep Small > Abs(Wind Amount)
+ Every Round(( 500 - Abs(Wind Amount * 10) ) * 3)
River Deep Small : Add -1 to Animation Spd
* Animation Spd of River Deep Small < 0
River Deep Small : Set Animation Spd to 0
* Animation Spd of River Deep Small > 50
River Deep Small : Set Animation Spd to 50
Thank you again!