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-6-04. : 3:42 am]
RIVE -- Hellooooo, Nurse
[2026-6-03. : 4:19 pm]
NudeRaider -- Hello World!
[2026-6-01. : 4:03 pm]
IskatuMesk -- no Hello World? No Hello . jpeg? Not even ddosing some government website? smh my head
[2026-5-31. : 10:02 pm]
Symmetry -- I was really just figuring out how to compile
[2026-5-31. : 10:02 pm]
Symmetry -- I didn't make it do anything
[2026-5-31. : 9:17 pm]
Ultraviolet -- hell yeah. did you have trouble making the button functional, or just haven't gotten there yet?
[2026-5-31. : 8:29 pm]
Symmetry -- I made the marine shoot lasers and gave the medic a nonfunctional button
[2026-5-31. : 8:07 pm]
Ultraviolet -- Symmetry
Symmetry shouted: I did my first EUD thing today. Feels like me finding arsenal at age 8 again
haha for sure. in some ways it's even more exciting because you can play EUD maps on regular battle.net, don't need to convince someone to download your mod to play with you. what did you do?
[2026-5-31. : 6:47 pm]
Symmetry -- I did my first EUD thing today. Feels like me finding arsenal at age 8 again
[2026-5-31. : 3:20 pm]
l)ark_ssj9kevin -- le reddit
Please log in to shout.


Members Online: NudeRaider