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-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.
[2026-7-16. : 6:26 am]
NudeRaider -- I mean yes, maps - through EUDs - were theoretically able to do that as well, but that was patched quickly.
[2026-7-16. : 6:25 am]
NudeRaider -- Symmetry
Symmetry shouted: Ohhh imagine a SC map that could delete itself
not the map, the editor
[2026-7-16. : 2:28 am]
Symmetry -- I vaguely remember Voy doing some ACE back in the day, but I had no idea EUDs could do that kind of shit. I am very much catching up on the technology
[2026-7-16. : 2:28 am]
Symmetry -- Ohhh imagine a SC map that could delete itself
[2026-7-15. : 8:51 pm]
NudeRaider -- Symmetry
Symmetry shouted: NudeRaider Is EUD editor capable of writing shit onto the player's harddrive? That seems like it would be dangerous
yeah an editor that isn't allowed to write files sounds rather pointless, so I'd assume it can. Like most other programs too btw. and yes, obviously that's dangerous, but also kinda necessary. MS introduced that virtualization for exactly that reason.
[2026-7-15. : 4:10 am]
Ultraviolet -- I don't think so. I think they shut that shit down after 1.16, maybe even earlier
Please log in to shout.


Members Online: Roy