Essentially, I have a system where I copy P1's DCs over to P2 and P8 and transfer it from P8 back to P1, so P2 now holds P1's previous death count. Then, after some magic P1's DC goes back down to zero, and I transfer P2's DC to P1, and add some amount.
So theoretically, say I start at 20 and add 10 at the very end:
(P1DC, P2DC, P8DC)
P2DC = P1DC
P8DC = P1DC
P1DC = 0 (0, 20, 20)
P1DC = P8DC
P8DC = 0 (20, 20, 0)
MAGIC (0, 20, 0)
P1DC = P2DC
P2DC = 0 (20, 0, 0)
P1DC += 10 (30, 0, 0)
... is what should happen, but at the very last step, I discover that P1's death count is actually only 10 after all the triggers have executed. What went wrong?
Here are the actual triggers:
http://pastebin.com/twCAcKfb
None.
Sounds to me like you ended up setting P1DC to zero and added ten. Since the Magic makes P1DC go to 0, I would assume the P1DC = P2DC isn't firing correctly.
None.
Sounds to me like you ended up setting P1DC to zero and added ten. Since the Magic makes P1DC go to 0, I would assume the P1DC = P2DC isn't firing correctly.
That's not it.
I ran a debug test and found that the P5 transfer to P1 actually fires BEFORE the "magic" happens, even though it appears LATER in the trigger list and is limited by the switch. Mindfuck galore?
I still have no idea what is causing that, though.
EDIT> I figured it out; during the "Center View" action, all actions after "Center View" in the same trigger are suspended while the game checks the conditions of the other triggers. So say your actions look like this:
If (True)
Center View
Set Switch 1
//------------//
If (Switch 1 is set)
Display "Hello World!";
//------------//
If (Switch 1 is not set)
Display "YOU ARE GAY";
You will receive the output "YOU ARE GAY", even though "Set Switch 1" comes before the other triggers. In other words, until "center view" is finished, all remaining actions in the trigger are temporarily frozen, creating sometimes undesirable effects. How annoying...
Post has been edited 1 time(s), last time on Apr 6 2010, 11:26 pm by Aristocrat.
None.
Quote from name:NerdyTerdy
So did you just put Center View at the end of the action list? I always thought trigger action order didn't matter.
Yes, and that fixed everything, thankfully. Action order actually does matter a lot, especially when using "wait"s. See the wiki article on wait blocks.
None.
Yep, actions fire in order from top to bottom -otherwise mobile grids would never work
None.