Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Documentation for all unintuitive trigger behavior
Documentation for all unintuitive trigger behavior
Oct 9 2024, 1:51 pm
By: sethmachine  

Oct 9 2024, 1:51 pm sethmachine Post #1



I'm looking for all the gotchas surrounding trigger behavior and things that aren't intuitive.

For example, supposedly unit location data is not refreshed within a trigger cycle. I believe what this could mean is if I had 2 triggers like "X brings unit to location Y" and the first trigger removes "unit from anywhere", the second trigger will still fire off, even though that unit was removed. To get around this, I believe you can use death counters or switches to explicitly communicate this information.

Are there other gotchas that are important when building complex trigger systems?



None.

Oct 9 2024, 2:35 pm Oh_Man Post #2

Find Me On Discord (Brood War UMS Community & Staredit Network)

http://www.staredit.net/wiki/index.php/Quirks_and_nuances

Does this link help?




Oct 14 2024, 4:51 pm Ultraviolet Post #3

We do a little trolling

Quote from sethmachine
For example, supposedly unit location data is not refreshed within a trigger cycle. I believe what this could mean is if I had 2 triggers like "X brings unit to location Y" and the first trigger removes "unit from anywhere", the second trigger will still fire off, even though that unit was removed. To get around this, I believe you can use death counters or switches to explicitly communicate this information.

This scenario actually isn't an issue and doesn't happen the way you're describing. Remove unit immediately updates that data so if you check for the unit right after, it won't be detected. On the other hand kill unit will mess things up because it's more of a "sentence unit to die" order and that unit will continue to exist for the rest of the trigger cycle. The link Oh_Man posted helps with many of the quirks and nuances, but to be honest, I think there are more than just that. It's unfortunately usually hard to think of/remember them until you encounter them in practice though.



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

Oct 14 2024, 6:14 pm Vrael Post #4



The page Oh_Man linked is a goody, I think the main all-articles page also is a good reference: http://www.staredit.net/wiki/index.php?title=Special:AllPages

In particular, there are articles on the Bring and Command condition bugs, an article on Triggers themselves and the very specific order in which they run, and Wait blocks. There are definitely other problems like Ultraviolet mentioned with the Kill action, and for instance another I think I remember are there are a handful of units you can't actually spawn with triggers (have to have them pre-placed on the map, like one of the hero templar units), but I don't know of a central resource that lists everything.



None.

Oct 14 2024, 6:33 pm Ultraviolet Post #5

We do a little trolling

Quote from Vrael
I think I remember are there are a handful of units you can't actually spawn with triggers (have to have them pre-placed on the map, like one of the hero templar units)

This one is fixable these days thankfully. You can do it with EUDs by changing the StarEdit tab in units.dat. I think it's the location triggers and non-location triggers boxes. I always just make that section the same as it is for normal units for any unit I want to be creatable with triggers.



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.
[2026-7-23. : 6:40 am]
Oh_Man -- true
[2026-7-23. : 3:16 am]
RIVE -- Still annoyed there was never a trigger to stop or pause wavs.
[2026-7-23. : 1:40 am]
Oh_Man -- tthen u come to SCBW and it's like - upload WAV, play WAV.... sigh why cant it be that easy
[2026-7-23. : 1:40 am]
Oh_Man -- and no consistent easy to use way to then play the audio either
[2026-7-23. : 1:39 am]
Oh_Man -- where they use third party audioprogram called WWISE which basically makes adding audio extremely difficult
[2026-7-23. : 1:39 am]
Oh_Man -- i appreciate SCBW's ability to just let us upload and play WAVs so much compared to nightmare that is total war warhammer 3
[2026-7-18. : 2:27 am]
Symmetry -- https://staredit.net/topic/18903/ THE REVIEWS ARE HERE! "ok these are pretty good memes" - ssj9Kevin
[2026-7-17. : 2:58 pm]
Ultraviolet -- Symmetry
Symmetry shouted: Man I wish we had this tech back in the day when people played ums lmao
fr fr
[2026-7-17. : 2:39 am]
Symmetry -- Man I wish we had this tech back in the day when people played ums lmao
[2026-7-16. : 6:28 am]
NudeRaider -- EUD actions, specifically. The conditions remained. Today we can even have actions again, but they're all virtualized/whitelisted (not sure on the actual technical implementation) so you can only use them for specific intended purposed, not arbitrary code injections.
Please log in to shout.


Members Online: Roy