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:00 pm]
Symmetry -- poo poo papa
[02:46 pm]
lil-Inferno -- pee pee child
[2026-6-27. : 6:10 pm]
Ultraviolet -- sweet summer child
[2026-6-26. : 10:31 am]
NudeRaider -- blessed innocent soul knows nothing of the strife we had before EUDs were discovered :teehee:
[2026-6-23. : 3:29 am]
DarkenedFantasies -- Probably just didn't care. For example, at some point before release, they've updated the graphics of some of the Protoss buildings (Forge, CyberCore, Citadel, Observatory, Arbiter Tribunal), but instead of properly re-rendering them with edited 3D models, they did crappy copy-paste jobs on the rendered graphics.
[2026-6-22. : 8:35 pm]
Ultraviolet -- :wob:
[2026-6-21. : 11:38 pm]
Symmetry -- :wob:
[2026-6-21. : 4:56 am]
Ultraviolet -- I suppose we'll likely never know, but my guess would be that they already saw it operating successfully and there was no monetary incentive to finish the original work. And the dev cycle in old school Blizzard was so hectic, it's possible it just got forgotten about after the original game got released. Plus there's an element of existing MPQ files that were packaged with the original discs becoming outdated if they updated it. And it's not like they remade the original MPQs, they just made new ones for BW specifically
[2026-6-21. : 4:26 am]
Oh_Man -- so that makes me think maybe the theory they are unfinished is not true and its a deliberate design decision, coz why not finish them wen ur making brood war?
[2026-6-21. : 4:25 am]
Oh_Man -- the thing is thos buildings are from classic. that means they went ahead and made brood war without ever finishing the 'unfinished' buildings
Please log in to shout.


Members Online: Roy, Moose, Zycorax