cant help you because i cant see all your code above 22
1. ok because from event 1 to 22 transition var do not equal to 1 therefore event 22 did not fire
2. the reason transition var change from 1 to 0 is somewhere after event 22 you have a event that change transition var from 1 to 0
3. i cant see you code to tell what u do wrong
4. final line 22 is correct by itself. If you set transition var to 1, on start of layout you'll see system wait 30 second
if you dont understand this post the code or .capx