Staredit Network

Staredit Network -> UMS Assistance -> Wait trigs
Report, edit, etc...Posted by ElanMorin(13) on 2004-11-02 at 15:23:44
Here's the dilemna: The map I'm making consists of multiple cities that spawn units after an alloted amount of time. I need each city to have its own spawn trigger because I want each city to have the possibility of being captured. This means that I have 'wait' actions in each trigger, which causes the issue of all the wait triggers running together making it so the time is extended a great deal more than I want. Is there a way to make each trigger function independantly from the sequence of triggers above it?

*note: I already tried making the top 'wait' trigger the amount of time I want, while the others under it only 1 milisecond. It functions alright, but it still isn't optimal to my standards.
Report, edit, etc...Posted by NeoNightmareX on 2004-11-02 at 15:34:25
QUOTE(ElanMorin(13) @ Nov 2 2004, 03:23 PM)
Here's the dilemna:  The map I'm making consists of multiple cities that spawn units after an alloted amount of time. I need each city to have its own spawn trigger because I want each city to have the possibility of being captured.  This means that I have 'wait' actions in each trigger, which causes the issue of all the wait triggers running together making it so the time is extended a great deal more than I want.  Is there a way to make each trigger function independantly from the sequence of triggers above it?

*note: I already tried making the top 'wait' trigger the amount of time I want, while the others under it only 1 milisecond.  It functions alright, but it still isn't optimal to my standards.
[right][snapback]93441[/snapback][/right]


do you mean that the trigger takes a while to launch or something? i dont quite understand because of my short attention span, could you summarize it? if the triggers take too long to launch, try using hyper triggers
Report, edit, etc...Posted by PearS on 2004-11-02 at 15:45:00
Ya the waits will overlap causing them to be longer than they should be. I suggest using death counts. To do this have a trigger like

Current player suffered at least one death of 'bengalas'(something he cannot possibly lose)

Subtract one death for current player for 'bengalas'
perserver trigger


then to make your towns spawn or what ever, you would start the player with say 300 death counts and it is constantly moving down so you would do this:

current player suffered 240 deaths of 'bengalas'

spawn five marines at town one
perserve trigger

current player suffered 180 deaths of 'bengalas'

spawn five marins at town two
perserve trigger

etc

etc


current player suffers 0 deaths of 'bengalas'

spawn five marines at town five
set deaths for current player to 300
perserver trigger


or you can have seperate death counts for each town by using a different critter for each one
Report, edit, etc...Posted by ElanMorin(13) on 2004-11-02 at 15:50:49
I'm not quite sure I understand that, if I have a count for the deaths of something the player cannot lose, how does the counter go down?
Report, edit, etc...Posted by KlowN. on 2004-11-02 at 16:25:06
did u want like switch 1 is set create units at x wait 10000 ms... then if computer has suffered x deaths... clear switch 1...?? the players could still die
Report, edit, etc...Posted by LegacyWeapon on 2004-11-02 at 16:43:36
QUOTE(KlowN. @ Nov 2 2004, 04:25 PM)
did u want like switch 1 is set create units at x wait 10000 ms... then if computer has suffered x deaths... clear switch 1...?? the players could still die
[right][snapback]93471[/snapback][/right]

What the hell are you talking about... Stop spamming too please!

Instead of having a wait at the end of a trigger followed by a preserve trigger. Like so
Actions:
Create blah blah blah
wait blah blah blah
Preserve trigger


Make it,
Condition: Death score for current player is exactly 0.
Actions:
Create blah blah blah
Set deaths of unused unit to set to X* for current player

and make another trigger,
Condition: Current player's death score of unused unit is at least 1.
Actions:
Set deaths of unused unit to subtract 1 for current player.

X should be 100*(number of seconds)
Only if you use hypertriggers. Otherwise it will be slow as hell.
Report, edit, etc...Posted by ElanMorin(13) on 2004-11-02 at 16:47:45
What exactly are hyper triggers?
Report, edit, etc...Posted by LegacyWeapon on 2004-11-02 at 16:49:22
Please I advise you to change to mapmaking skill to Beginner. I am not dissing you, I am trying to help you get the proper amount of help when someone explains things to you.

http://www.staredit.net/index.php?act=tuto...yper%20Triggers
Report, edit, etc...Posted by ElanMorin(13) on 2004-11-03 at 01:42:44
Lol, ok I didnt know what was considered beginner and average.
Report, edit, etc...Posted by high6 on 2004-11-03 at 06:44:50
i dont remember what one it is but this is what u need for what ur saying

instead of waits do this

Trigger
Conditions:
¤ scenerio time is ###
Actions:
¤ create ###########


what that does is ones the cond time is that time then it will create the units

i might be wrong with scenerio time thing it might be a different 1 but it should work
Report, edit, etc...Posted by ElanMorin(13) on 2004-11-03 at 11:44:14
How would that keep creating them? I want the spawns to keep spawning over the time intervals. It seems like that method would only give me a spawn once.
Report, edit, etc...Posted by (U)Bolt_Head on 2004-11-03 at 12:33:36
Then you should just do what Legacy weapon says. Athough i would make some minor changes witch i'll describe later.

First off to explain your original question only one wait can run per player at any given moment. This causes problems because short waits may end up being very long and long waits much longer.
To solve this problem we use a death counter. Stracraft can set the amount of deaths a unit for a partictular player has, we can add and subtract from that just like we can with resource or score triggers.
To make it into a timer we rely on the triggers firing rate to moderate our time. We have a trigger add to the counter every time the triggers run and it becomes a accurate timmer. We then use other triggers to reset the timmer and or do specific actions when the time is at a chosen amount (kinda like a stopwatch).
Well its easyer than it sounds, here comes the triggers

Trigger
Players:
¤ Players units are spawning for
Conditions:
¤ Current player suffers exactly 1 death of 'unused unit'
Actions:
¤ Create X dudes at location for Current Player
¤ Set deaths of 'unused unit' for current player to 'A number that reflects the time'
¤ Preserve Trigger


-Divide the time you want to wait by 1.5. So if you want to wait 60 seconds set the deaths to 40. Then play with it to make sure it is correct.
-If you are using hyper triggers you would multiply the number of seconds you want to wait by 12 (not 100 thats way to big). But i wouldn't concern yourself with hyper triggers you don't need them.

Then of course you need a trigger to actually add the death score.
Trigger
Players:
¤ Players units are spawning for
Conditions:
¤ Current player suffers at least 2 deaths of 'unused unit'
Actions:
¤ Subtract 1 deaths of 'unused unit' for current player
¤ Preserve Trigger


The unused unit is just any unit you choice that WILL NOT die during the game of natural causes (ie: damage).

A slight change i made from LegacyWeapon's triggers is that I have the units spawn at 1 instead of 0. The reason for this is because you have 0 deaths at the start of the game. Since i belive you only want them to spawn when you own the city you can set the triggers to do that easyer.

For an example, when you own the city with the spawn set the deaths to 1 and the loop will start. If you lose control of the city set it to 0 and it will stop.
Report, edit, etc...Posted by ElanMorin(13) on 2004-11-03 at 14:42:07
Ok, so here's an example of how I set it up:

(players)
-All Players
(conditions)
-Current Player commands exactly one "Tear"(name of the city)
-Current Player suffers exactly 1 deaths of "bengalaas"
(actions)
-Create units for current player at location
-Set deaths of bengalaas for current player to 135
-preserve trigger

A. Would that work?
B. Do I have to pick a different 'unused' unit for each city?
Report, edit, etc...Posted by .Coko[CK] on 2004-11-03 at 15:01:03
Is this not basically LotR Style triggers?

http://www.staredit.net/index.php?act=cont...view&content=82

Basically tells you what to do for LotR Maps, plus some triggers your want to use.
Report, edit, etc...Posted by ElanMorin(13) on 2004-11-04 at 17:07:29
Thanks, but ummm....I'd like to see if the death counter way works first...since I already changed them to that format....
Report, edit, etc...Posted by (U)Bolt_Head on 2004-11-04 at 20:12:30
If the times are differant you will need differant death counters. Like if a town has a good army and you want it to spawn more often than a town with a smaller army then you would need differant counters.

Otherwise if you have a reinforcements time (something that could run off of the countdown timer) then you can get away with only one death counter.

PS. LOTR Maps are dumb, onlything worse is RPs.
Report, edit, etc...Posted by ElanMorin(13) on 2004-11-04 at 20:40:23
Ok, well would my setup work? I'm still not sure how this all functions off of units that arent even present in the game.
Report, edit, etc...Posted by Screwed on 2004-11-04 at 23:51:30
Well... your setup would work if there is another trigger that keeps altering the death amounts. I dunno if you're really getting this because we are just repeating ourselves all the time.

I'll try explain this whole thing again...
QUOTE(The person asking the question)
I'm still not sure how this all functions off of units that arent even present in the game.


Well.. ever heard of switches? well.. if not.. learn them first. If you do... then the thing 'death counter' everyone refers to is acting like 'switch timer'. There is a trigger action called 'SetDeaths' in Staredit. You can directly subtract, add, or set the deaths of a unit using that action, I think that is what you are not getting. So you set the spawning trigger's condition to 1 death of an unused unit because as mentioned before, they can be directly set and you don't want a unit present in the game to stuff it up. (the reason is if the unit u used for death counters are present in the game.. they mite get killed and add deaths to the cycling death counter system) And the deaths counter they are referring to also acts as a timer, you may not see any waits.. but the case is that you don't want any waits that 'stack up' and interfere with your triggers. So instead... they use no waits and rely on a cycling system someone mentioned before and use 'preserve trigger' and take advantage of the speed triggers fire in the game.

Sorri.. i didn't proof read this.. I'll edit this some other time if its too confusing.. I'm kinda in a hurry.
Report, edit, etc...Posted by PearS on 2004-11-05 at 00:15:15
QUOTE
Ok, so here's an example of how I set it up:

(players)
-All Players
(conditions)
-Current Player commands exactly one "Tear"(name of the city)
-Current Player suffers exactly 1 deaths of "bengalaas"
(actions)
-Create units for current player at location
-Set deaths of bengalaas for current player to 135
-preserve trigger

A. Would that work?


Yes that would work. All you would need is a way for the deaths to count down, which is easy to do.

QUOTE
Trigger
Players:
¤ Players units are spawning for
Conditions:
¤ Current player suffers at least 2 deaths of 'unused unit'
Actions:
¤ Subtract 1 deaths of 'unused unit' for current player

¤ Preserve Trigger


with that it will count down and when it hits one, the units will spawn again. Your good to go!
Report, edit, etc...Posted by Tuxedo Templar on 2004-11-05 at 00:27:05
You don't need hyper triggers to count times with death counters (unless you want have the spawners timing precise to 1/12th of a second). Remember that without wait blockers running for any player the triggers will execute ~1 every second, and each time they do you can simple add to the death counters you plan to use for each city and time it that way.
Report, edit, etc...Posted by (U)Bolt_Head on 2004-11-05 at 00:36:28
QUOTE((U)Bolt_Head @ Nov 3 2004, 12:33 PM)
-If you are using hyper triggers you would multiply the number of seconds you want to wait by 12 (not 100 thats way to big).  But i wouldn't concern yourself with hyper triggers you don't need them.
[right][snapback]93898[/snapback][/right]


Tux: Ha Ha i beat you tux lol. Just kidding, anyways after House of the Haunted i prefer to use hyper triggers for counters. The reason being is that your other waits will cause triggers to fire again and your counter will speed up. So as the case is with my music loop and the elivator you get irregular times. (you remember that?)

This generation of mapmakers is crazy about hyper triggers, it is suggested to beginners long before there ready to mess with them.
Next Page (1)