Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Disappearing death counts?
Disappearing death counts?
Apr 6 2010, 10:29 pm
By: Aristocrat  

Apr 6 2010, 10:29 pm Aristocrat Post #1



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.

Apr 6 2010, 10:36 pm CecilSunkure Post #2



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.

Apr 6 2010, 11:13 pm Aristocrat Post #3



Quote from CecilSunkure
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.

Apr 7 2010, 12:20 am Ultraviolet Post #4



So did you just put Center View at the end of the action list? I always thought trigger action order didn't matter.



My Projects:

Impossible Ultraviolet | Impossible UV 2 | Impossible UV 3
Mercenaries 2020 | Mercenaries III
Squad Defense

Legacy Projects (No guarantee of functionality in modern SC):

Pixel Adventure 2 | Space Snipers | Control the Ball

______________________________________________

Join me in Torn City

Apr 7 2010, 12:30 am Aristocrat Post #5



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.

Apr 7 2010, 1:26 am CecilSunkure Post #6



Yep, actions fire in order from top to bottom -otherwise mobile grids would never work :P



None.

Apr 7 2010, 1:53 am Ultraviolet Post #7



Quote from Aristocrat
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.

Quote from CecilSunkure
Yep, actions fire in order from top to bottom -otherwise mobile grids would never work :P

Well, I meant aside from that shit :P Mainly what I meant by that statement was that I didn't think any actions besides waits would block other actions.



My Projects:

Impossible Ultraviolet | Impossible UV 2 | Impossible UV 3
Mercenaries 2020 | Mercenaries III
Squad Defense

Legacy Projects (No guarantee of functionality in modern SC):

Pixel Adventure 2 | Space Snipers | Control the Ball

______________________________________________

Join me in Torn City

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:00 pm]
RIVE -- It's a shame nothing became of it.
[2025-5-30. : 9:45 pm]
Ultraviolet -- :???:
[2025-5-30. : 6:56 pm]
dumbducky -- Tim Walz is my dad; Kamala's my fun aunt who lives next door. They just found out I'm being bullied by the shittiest kid in my class, JD. When they try to talk to his dad, Don, it becomes clear he's the real problem. They go back to their car; Kamals pulls out her cop badge, Tim grabs his old baseball bat. They walk back to Don's porch. As Tim reaches for the doorbell they look at each other and smile. This is going to be fun.
[2025-5-28. : 1:24 am]
Ultraviolet -- Competitive Sperm Racing might become a thing :lol:
[2025-5-25. : 7:31 am]
Zycorax -- :wob:
[2025-5-24. : 4:55 pm]
Ultraviolet -- :wob:
[2025-5-23. : 4:13 pm]
UndeadStar -- :wob:
[2025-5-19. : 7:14 pm]
Ultraviolet -- :wob:
[2025-5-15. : 3:53 pm]
Ultraviolet -- oh yeah probably. think I misinterpreted the original message. I thought he meant moving the flag revealed the base in the sense that it opened it up to being scouted, but what you're saying makes more sense
[2025-5-15. : 11:37 am]
Sie_Sayoka -- dont those ladder maps have use map settings game type? i remember in a lot of them there was display text showing the maker and other credits at the beginning
Please log in to shout.


Members Online: Sie_Sayoka