Staredit Network

Staredit Network -> UMS Assistance -> Wait Trigger Problem (Preschool Showdown)
Report, edit, etc...Posted by PhoenixRajoNight on 2005-03-26 at 17:05:29
Ok, I have a map called Preschool Showdown, that i have been the creator/editor of since 2.0. I'm currently on 4.7, I have a system I came up with to time the spawning of units, because the wait trigger wouldnt spawn units correctly the normal buildings would cause the spawn to work correctly, but addons, and advanced buildings would only spawn once. Now I'm looking at a bigger problem tho, I find my map exceeding max units in-game faster, and on a common basis and am looking for a way to change it back to the wait trigger format.

So, I guess heres the question, why does the wait trigger cause this problem, of being able to spawn with normal buildings but not with addons and anything in advanced building trees, or is it something else that im missing, like multiple wait triggers doing these things combined, and how would i go about being able to have time between spawns with it correctly.

BoltEdit: I made up a new thread title for you and used your orignal title as the description.
Report, edit, etc...Posted by BeeR_KeG on 2005-03-26 at 17:13:02
Instead of using waits you can use a physical wait.

You may ask yourself what is a physical wait?

Well it's quite simple, you create an observer for a computer player at Location A. You then order it to move to Location B. Once the observer has reached Location B, you remove the observer and spawn the units. Then you create an Observer at Location A and repeat the process.

It works much like a Countdown Timer but much more efficient and simpler to use.

You can also use Death Counters as Waits. 12 Death counts will fire in 1 second.

Now to your problem of waits stacking. I don't have much knowledge of why waits do this but I believe that when I wait is in effect no trigger for that Player(or All Players) will fire, meaning that the wait won't apply only to that trigger to which you want a wait. Now with 2 or more waits, there is a problem because one wait will fire and then after the first one did, the second trigegr with that wait will fire so the wait will "seem" to be longer than intended.

My suggestion is don't use waits.
Report, edit, etc...Posted by Screwed on 2005-03-26 at 17:17:49
I made this death counter map for a friend, the ending is a bit sloppy, but maybe looking at this map will give you more understanding to death counts.

Just to fix a Beer_Keg's sentence, 12 death counter will fire in one second WITH Hyper Triggers.
Report, edit, etc...Posted by LegacyWeapon on 2005-03-26 at 17:37:42
Also, we have tutorials for everything!
http://www.staredit.net/index.php?tutorial=124
Report, edit, etc...Posted by PhoenixRajoNight on 2005-03-26 at 17:46:20
Ok, I'm not quite sure how those triggers work. but here this is a list of one some triggers im currently using to make my effect.

Team 1 & 2

Trigger
Description:
Make Pyro 1
Players:
¤ Player 1
¤ Player 2
¤ Player 3
¤ Player 4
¤ Player 5
¤ Player 6
¤ Player 7
¤ Player 8
Conditions:
¤ Current Player Commands atleast 1 Boiler Room.
Actions:
¤ Create 1 Kid in Traing at 'Make Pyro' for Current Player. Apply Properties.
¤ Preserve Trigger.
¤ Comment: Make Pyro 1.


Team 1

Trigger
Description:
Make Pyro 2
Players:
¤ Player 1
¤ Player 2
¤ Player 3
¤ Player 4
Conditions:
¤ Current player commands exactly 1 Boiler Room.
¤ Current Player Brings Exactly 10 Kids in Training to 'Make Pyro'.
Actions:
¤ Kill 10 Kid in Training for Current Player at 'Make Pyro'.
¤ Create 1 Pyro at 'Team 1 Drop Zone 1' for Current Player.
¤ Preserve Trigger.
¤ Comment: Make Pyro 2.



Trigger
Description:
Make Pyro 3
Players:
¤ Player 1
¤ Player 2
¤ Player 3
¤ Player 4
Conditions:
¤ Current player commands exactly 2 Boiler Room.
¤ Current Player Brings Exactly 10 Kids in Training to 'Make Pyro'.
Actions:
¤ Kill 10 Kid in Training for Current Player at 'Make Pyro'.
¤ Create 2 Pyro at 'Team 1 Drop Zone 1' for Current Player.
¤ Preserve Trigger.
¤ Comment: Make Pyro 3.



Trigger
Description:
Make Pyro 4
Players:
¤ Player 1
¤ Player 2
¤ Player 3
¤ Player 4
Conditions:
¤ Current player commands exactly 3 Boiler Room.
¤ Current Player Brings Exactly 10 Kids in Training to 'Make Pyro'.
Actions:
¤ Kill 10 Kid in Training for Current Player at 'Make Pyro'.
¤ Create 3 Pyro at 'Team 1 Drop Zone 1' for Current Player.
¤ Preserve Trigger.
¤ Comment: Make Pyro 4.


Team 2

Trigger
Description:
Make Pyro 2
Players:
¤ Player 5
¤ Player 6
¤ Player 7
¤ Player 8
Conditions:
¤ Current player commands exactly 1 Boiler Room.
¤ Current Player Brings Exactly 10 Kids in Training to 'Make Pyro'.
Actions:
¤ Kill 10 Kid in Training for Current Player at 'Make Pyro'.
¤ Create 1 Pyro at 'Team 1 Drop Zone 1' for Current Player.
¤ Preserve Trigger.
¤ Comment: Make Pyro 2.



Trigger
Description:
Make Pyro 3
Players:
¤ Player 5
¤ Player 6
¤ Player 7
¤ Player 8
Conditions:
¤ Current player commands exactly 2 Boiler Room.
¤ Current Player Brings Exactly 10 Kids in Training to 'Make Pyro'.
Actions:
¤ Kill 10 Kid in Training for Current Player at 'Make Pyro'.
¤ Create 2 Pyro at 'Team 1 Drop Zone 1' for Current Player.
¤ Preserve Trigger.
¤ Comment: Make Pyro 3.



Trigger
Description:
Make Pyro 4
Players:
¤ Player 5
¤ Player 6
¤ Player 7
¤ Player 8
Conditions:
¤ Current player commands exactly 3 Boiler Room.
¤ Current Player Brings Exactly 10 Kids in Training to 'Make Pyro'.
Actions:
¤ Kill 10 Kid in Training for Current Player at 'Make Pyro'.
¤ Create 3 Pyro at 'Team 1 Drop Zone 1' for Current Player.
¤ Preserve Trigger.
¤ Comment: Make Pyro 4.


I also have some clause triggers to destroy the 4th building and produce some units for the money they displaced in building the fourth, and to kill any extra kids in training so it doesnt stop working. These triggers work really well and dont clog up too much but later in game i get cannot create more units and the kids in traing just take up space at that point.


Report, edit, etc...Posted by LordVodka on 2005-03-26 at 17:50:32
QUOTE(LegacyWeapon @ Mar 26 2005, 05:37 PM)
Also, we have tutorials for everything!
http://www.staredit.net/index.php?tutorial=124
[right][snapback]173263[/snapback][/right]


LOL, LegacyWeapon loves to say this ^_^
Report, edit, etc...Posted by (U)Bolt_Head on 2005-03-27 at 02:58:39
QUOTE(PhoenixRajoNight @ Mar 26 2005, 04:05 PM)
So, I guess heres the question, why does the wait trigger cause this problem, of being able to spawn with normal buildings but not with addons and anything in advanced building trees, or is it something else that im missing, like multiple wait triggers doing these things combined, and how would i go about being able to have time between spawns with it correctly.
[right][snapback]173234[/snapback][/right]


Well it seems everyone decided to compleatly ignore your question and just say 'OMG waits are bad do this instead'.

The problem you are experiancing is what I like to call a 'Wait Block'. This is one wait being 'blocked' by another. Starcraft can only run one wait per player at any given moment. Because of this if one trigger is 'waiting' and another trigger trys to run a wait action then it can't. So instead the trigger is delayed until the original 'waiting' trigger finishes its wait. Only after it the original one is done can the second wait start to fire.

This many times gives the appearnace that waits 'add together'. However waits don't technaclly add together, they delay one another.

PS. Your spawning of buildings is compleatly unreleated to the wait block.
PSS. Try using a decriptive title for your thread next time. Your in the Mapping Assistance Forum, we know you need help thats why your posting.
Report, edit, etc...Posted by PhoenixRajoNight on 2005-03-27 at 16:50:15
Ok, so if i have 1 wait trigger in the first trigger of spawning, then make some triggers after it, would the spawning triggers that lay after it for that player be delayed by the wait in the original trigger if it didnt have a wait in it itself?

But if that isnt true could i make the wait on the other spawns after it 0 miliseconds so it would wait for the first, lets say 10000 miliseconds, and go to the second triger and because it saw the wait it was delayed by the first, so it stops it from going off imediately, but then when the first wait goes off it would also trigger, after because its wait is 0 miliseconds?
Report, edit, etc...Posted by (U)Bolt_Head on 2005-03-28 at 01:13:45
I hate to answer your questions directly because i'm not sure if I'm interpreting what your saying correctly.

I belive what your saying in the second paragraph is correct but i'll restate it.

You have these 3 triggers.
Trigger
Players:
¤ Player 1
Conditions:
¤ Switch 1 is set
Actions:
¤ Create one Dude for Current Player
¤ Wait 10,000
¤ Create one Dudet for Current player

Trigger
Players:
¤ Player 1
Conditions:
¤ Switch 1 is set
Actions:
¤ Create one Guy for Current Player
¤ Wait 0
¤ Create one Gal for Current player

Trigger
Players:
¤ Player 1
Conditions:
¤ Switch 1 is set
Actions:
¤ Create one He for Current Player
¤ Wait 0
¤ Create one She for Current player


In these 3 triggers you would first see all the 'male' units, then after about 10 seconds the female units would all be created, pretty much at the same time.

So Yeah the later triggers will have to wait for the first before they can run there wait. But if the conditions were differant and one of the second two fired first then the first one will not override the wait.

Determaning Wait Prioirity is a really difficult thing to do.
Report, edit, etc...Posted by PhoenixRajoNight on 2005-03-28 at 01:32:22
Ok, thank you very much, I think I'm going to try it this way, one last question tho, if i have a trigger to go off and give peeps 3 mins per sec, but i want to put in hypertriggers, how can i have it so they dont get 12x3 mins per second.

And, 1 last question about the waits, if i have a wait in player 1 is it going to add to the wait for player 2?
Report, edit, etc...Posted by (U)Bolt_Head on 2005-03-28 at 02:00:15
I would simply make your hyper trigger owned by a computer player or something. Then for your minerals trigger put a wait 1000 in it. Unless your running alot of other waits. There are alot of options.

Anyways no it won't add to player 2. As I said "Starcraft can only run one wait per player at any given moment". This is why it is suggested to put the hyper triggers for a single player, so they don't block with the other players wait actions.
Report, edit, etc...Posted by PhoenixRajoNight on 2005-03-28 at 02:17:17
so i should make my map 3v3 max instead of 4v4 so i have a comp for the hyper triggers then. I'm kinda guessing that this is what i have to do so i can accomplish the spawns and hypertiggers correctly, sorry for being a "newb" but i wanna see if i can get this wait thing to work.

As far as i can see i am the only one trying, but if i accomplished this with success, maybe i can make a tutorial on here about it to help other map-makers.
Report, edit, etc...Posted by Zergling[SK] on 2005-03-28 at 02:40:17
A very easy way to stop this is to make a countdown timer. make a universal wait time for all units (10 seconds let's say). Here is how its done...

Trigger
Description:
Countdown Timer
Players:
¤ Computer Player
Conditions:
¤ Countdown Timer is Exactly 0 Seconds
Actions:
¤ Set Countdown Timer: Set to 10 seconds
¤ Preserve Trigger


Trigger
Description:
Making Guys
Players:
¤ Player 1-3
Conditions:
¤ Current player commands 1 "Boiler Room"
¤ Countdown Timeris Exactly 0 Seconds
Actions:
¤ Create 1 pyro (or whatever) at wherever for current player
¤ preserve trigger


So on and so forth for other units/buildings
Report, edit, etc...Posted by PhoenixRajoNight on 2005-03-28 at 03:15:40
Only problem with that is i have multiple spawns at diif time intervals, and as far as i know i cant use death counter either because i have so many spawning units that id need a diff unit for each unit, and considering they die in combat i couldnt use that unit
Report, edit, etc...Posted by chuiu on 2005-03-28 at 10:23:02
If you want to give 3 ore per second with hypers on, you need to do something like this:

C:
Current Player Custom score is at most 11.
A:
Modify score for Current player: Add 1 custom.
Preserve trigger.

C:
Current player Custom score is at least 12.
A:
Modify score for Current player: Set to 0 custom.
Modify resources for Current player: Add 3 minerals.
Preserve trigger.

You could also make it run more smoothly and use at most 3 at most 4 and give them 1 score every 1/3 a second.
Report, edit, etc...Posted by (U)Bolt_Head on 2005-03-28 at 11:38:05
QUOTE(PhoenixRajoNight @ Mar 28 2005, 02:15 AM)
Only problem with that is i have multiple spawns at diif time intervals, and as far as i know i cant use death counter either because i have so many spawning units that id need a diff unit for each unit, and considering they die in combat i couldnt use that unit
[right][snapback]174340[/snapback][/right]


There is 227 differant units, so you have 113 differant unit spawns?

Can you have multiple spawns or only one type at a time?

Anyways since you don't have any computers make your hyper for players 1-8 making sure it is the last trigger. Then you can use a counter for your waits spawns.
Report, edit, etc...Posted by PhoenixRajoNight on 2005-03-28 at 16:06:18
Attached File Preshool_Showdown_4.8.scx ( 88.4k ) Number of downloads: 0


Here take a look and see, I just wanna be sure what ur saying will work, its alot of revamping to do so i just dont wanna revamp it and find out that its not gonna be right for my map.
Report, edit, etc...Posted by PhoenixRajoNight on 2005-03-28 at 23:38:10
Ok, TY guys for all your help I've now tested some of the triggers out and now am incorporating these triggers into the map.

Hyper Triggers-Test Successful(Now Incorporated).

Custom Score(Time Tracker For Minerals)-Test Successful(Now Incorporated).

Death Counter System(Using Flying Units)-Test Successful(Incorporating).
Next Page (1)