"Set Animation Frame" bug & logical execution of subevents
C2 r47; Windows XP; FireFox 5; ATI Radeon HD 4800
The .capx is a work in progress, quite messy and does not make much sense so far. Comments are mostly in french but there is not much so far, so it should be nevertheless understandable.
I'm having little characters animated (RunnerZ). As they're white colored, I want to put a sprite in front of them that will colorize them. (Sprite "Couleur", effect "Source atop", 65% opacity).
In my default animation in Couleur, I've made 4 frames (each being a color). When I try to set animation frame to random(0,3) (one of my four frames) the app seems to just freeze.
In the capx you can see toggled code at the Couleur's creation (if untoggled the app won't execute at all) and the same code when you click the button "Fran?ais".
The expected behavior would be for the app to go on in its execution and the color on top of the RunnerZ to change to one of Couleur's colors/frames.
Moreover, when changing the effect on "Couleur", it seems the behavior of the sprites changes (in "XOR" for example, "Couleur" are always placed on/under "RunnerZ" even after the "screen warp" (not the case for "Source atop" that seem to only have one "Couleur" sticking to a "Runnerz" after warp whereas the other "Couleur" seem to get stuck on the left of the screen and only appear when "crossed" by a "RunnerZ"))
Source atop 0
Source atop 1
Now more of a notice about the execution of the subevents.
With the capx I gave. I tried to emulate CC's "sine" behavior.
If you take in "System - every tick" the two subevents "Logo.Amplitude >= Logo.AmplitudeMax". Try to gather them into a single block.
Sys - Every tick
... Logo.Amplitude >= Logo.AmplitudeMax
...... Logo.Direction = 0 (action: Direction = 100; Amplitude = 0)
...... Logo.Direction = 100 (action: Direction = 0; Amplitude = 0)
The event "Logo.Amplitude >= Logo.AmplitudeMax" isn't tested again inbetween the "Logo.Direction" subevents.
As you can see in the code of "Logo.Direction = 0" I intend the first condition to be false by reseting the value Amplitude.
Nevertheless, the subevent "Logo.Direction = 100" is executed (as Direction is now indeed of value 100).
As you can see my workaround was to test twice if "Logo.Amplitude >= Logo.AmplitudeMax". But at first, I didn't, and ended with my object just moving down (always in Direction = 0).
Is it the normal/expected behavior ?