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.
[07:32 pm]
Zoan -- I got $2000 bonus. I would like 2000 minerals, please
[2026-4-16. : 4:15 am]
DarkenedFantasies -- you eat lots of beans
[2026-4-16. : 3:46 am]
IskatuMesk -- how do i get gas
[2026-4-15. : 11:43 pm]
Moose -- you don't
[2026-4-15. : 10:06 pm]
Zoan -- how do i get minerals
[2026-4-14. : 11:45 pm]
ClansAreForGays -- Anyone wanna played Skewed StarCraft?
[2026-4-14. : 12:07 am]
Vrael -- NudeRaider
NudeRaider shouted: Vrael ranting still is though
you're a gentleman and a scholar, thank you
[2026-4-13. : 10:07 pm]
NudeRaider -- ya why phone people when you can just write letters
[2026-4-13. : 9:37 pm]
IskatuMesk -- I have never and will never own a phone
[2026-4-13. : 9:15 pm]
NudeRaider -- Vrael ranting still is though
Please log in to shout.


Members Online: anoeth47, Roy, O)FaRTy1billion[MM]