Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Problem with a trigger
Problem with a trigger
Jan 22 2008, 4:03 am
By: Caprianders  

Jan 22 2008, 4:03 am Caprianders Post #1



Im building a map where the player(s) will get attacked by the enemy at certain times, so ive chosen the Create Units trigger, with the condition "elapsed time: x seconds" and the action "create x zerglings at location y". But instead of x zerglings being created (in my case 5) there is like 20 or 30 zerglings being created... and Ive tried to bypass this in any way I can think of but it just doesnt work. Anyone know a way of making this happen?



None.

Jan 22 2008, 4:06 am Falkoner Post #2



Well, if you have the elapsed time being x seconds, and you have a Preserve Trigger, then as soon as it hits the X seconds, it will keep running that trigger over and over, since the condition is always true.

You probably want to use Death Count Timers



None.

Jan 22 2008, 4:23 am Caprianders Post #3



But Ive tried using a switch like this:

CONDITIONS:
Switch 1 is set

ACTIONS:
Create 5 zerg at location 2
Clear Switch 1

It still doesnt work though it should... shouldnt it?



None.

Jan 22 2008, 4:37 am who Post #4



it's not going to work unless that first switch is set.
i suggest you read the tutorial on death count timers, and hyper triggers.
also, it probably makes extra zerglings if that trigger is for more than 1 player. Therefore the conditions will be met for all those players and create extra units. Make the spawning trigger only for one player or for a whole force (without a Current Player condition).



None.

Jan 22 2008, 4:52 am Caprianders Post #5



Haha! I fixed it now. It was pretty simple too, I just did this:

Trigger 1

CONDITIONS
Elapsed time is 30 seconds
Switch 1 is cleared

ACTIONS
Set switch 1

Trigger 2

CONDITIONS
Switch 1 is set

ACTIONS
Create 5 zerglings at location 2

-

Thanks for the tip though, Ill look through that tutorial when I have the time!



None.

Jan 22 2008, 5:46 am Falkoner Post #6



Um.... That really won't work, unless you only want it to spawn once, 30 seconds into the game...



None.

Jan 22 2008, 6:48 am Caprianders Post #7



Well all I need to do to activate that script again is to clear switch 1, which I have other triggers for ;)

Post has been edited 1 time(s), last time on Jan 22 2008, 6:54 am by Caprianders.



None.

Jan 22 2008, 7:12 am Falkoner Post #8



No... Because if you activate it again, then it will immediately run, since 30 seconds has already passed.

The Elapsed Time condition is constant throughout the entire game, it never resets.



None.

Jan 22 2008, 10:19 am y10k Post #9



countdown timer is at most 0 seconds

set CDT to 30s
create some units
preserve.



None.

Jan 22 2008, 10:26 am candle12345 Post #10



Couldn't he just go:

Conditions:
30 Seconds has passed
Actions:
Create 5 zerglings.



That does what he wants, doesnt it?



None.

Jan 22 2008, 2:32 pm Falkoner Post #11



Yes, but he wants it to happen every 30 seconds I believe, so rather than have to make a trigger for every thirty seconds, he can use a Death Count Timer to make it loop over and over on its own.



None.

Jan 23 2008, 3:54 am who Post #12



or he could use a countdown timer like y10k said which would also work.



None.

Jan 23 2008, 10:29 am Falkoner Post #13



Yes, and now he has a pretty little timer at the top of his screen that resets every thirty seconds. Countdown timers are usually used for at least 3-5 minutes, otherwise they just look very unprofessional.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[02:13 pm]
Vrael -- pee poo sibling
[2026-6-28. : 7:00 pm]
Symmetry -- poo poo papa
[2026-6-28. : 2: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?
Please log in to shout.


Members Online: O)FaRTy1billion[MM], Prankenstein