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.
[2026-4-18. : 3:57 am]
NudeRaider -- https://staredit.net/381600/ You have 5 minutes, then you can only edit your posts.
[2026-4-17. : 4:05 pm]
NudeRaider -- DarkenedFantasies
DarkenedFantasies shouted: you eat lots of beans
:lol:
[2026-4-17. : 11:30 am]
NudeRaider -- I would like 3000 minerals, please
[2026-4-16. : 7: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
Please log in to shout.


Members Online: 8882a, IlyaSnopchenko, Moose