How can i get a trigger to fire every 60 games seconds without a wait action?
What i need is a trigger that will add 1 gas every 60 game seconds, but when i used Wait(40000); it would screw up other triggers.
try using custom score. unless you have a trigger accelerator (a bunch of wait 0s), they will accumulate every game second with a preserved.
Other than that, time how long a unit will take to get to a point (or use unit speed chart) and when it reaches that point, send it back, and repeat the process.
How would i use a custom score? can you show using a trigger maybe?
Sure, can you put the trigger box into a code box for me please? It's nifty, but i dont know the code for it.
CODE
[TRIGGER]
[DESCRIPTION][/DESCRIPTION]
[PLAYERS]
[p]
[/PLAYERS]
[COND]
[c]
[/COND]
[ACTIONS]
[a]
[/ACTIONS]
[/TRIGGER]
Trigger |
Players: |
¤ Current Player |
Conditions: |
¤ Elapsed Time; At least; 0 |
Actions: |
¤ SetScore(CurrentPlayer,Add,1,Custom);
|
¤ PreserveTrigger |
Trigger |
Players: |
¤ Current Player |
Conditions: |
¤ Score(CurrentPlayer,AtLeast,60,Custom); |
Actions: |
¤ SetResources(CurrentPlayer,Add,1,Gas);
|
¤ SetScore(CurrentPlayer,Subtract,60,Custom);
|
¤ PreserveTrigger |
but wouldn't that be flawed because it won't add every second will it? the time between triggers is aprox 1.5 seconds, i need this to be exact, the add 1 gas and add 1 custom would interfere each other at 60 as well. i dunno i guess i could try it.
ADDITION:
ya i tried it, i used a test map and had your triggers adding gas, and another set of triggers using Elapsedtime(atleast,60/120/160etc); to add 1 mineral
and they were way off of each other, so that method isn't very accurate
if it is 1.5, then reduce the score limit to make it the same. so lets see...
2 of these is 3 seconds, correct?
that would mean... make it 40 score instead of 60:
Trigger |
Players: |
¤ Current Player |
Conditions: |
¤ Elapsed Time; At least; 0 |
Actions: |
¤ SetScore(CurrentPlayer,Add,1,Custom);
|
¤ PreserveTrigger |
Trigger |
Players: |
¤ Current Player |
Conditions: |
¤ Score(CurrentPlayer,AtLeast,40,Custom); |
Actions: |
¤ SetResources(CurrentPlayer,Add,1,Gas);
|
¤ SetScore(CurrentPlayer,Subtract,40,Custom);
|
¤ PreserveTrigger |
Okay the ratio is Triggers:GameSeconds 32:60 so 8:15, but every time it reachs 32, another trigger fires, so slowly the score falls behind, this system wont work on my map anyways, because i have tons of triggers firing all the time
you migth already be useing it but can't you use the countdown timer?
ya im already using it..... but maybe
use death counters :\ i never use um, but i hear there easy and the ydon;t stack up theres somthing in the tutorials about um.
thats probrably the problem, too many triggers. Triggers usually start flawing when theres more than 30 triggers working at the same time... (from my own experience), so maybe you should try to keep future triggers off until they are needed and old triggers turned off when they are no longer needed if you are not already doing so.
sweet it worked, thanks sharf
ADDITION:
nah i used countdown timer and it worked, thnx for the suggestion tho
I hope you dont need it in the future. I was avoiding using it for that reason. Good luck with your map.
QUOTE(micro119 @ Jun 10 2006, 05:36 PM)
ya im already using it..... but maybe
[right][snapback]503985[/snapback][/right]
he said he was already using it damned, he just made it work his way lol np micro
I replied here telling you what to do! Why was it deleted? Have triggers like this:
Elapsed Game Time is at least 60 seconds
Add gas for current player
Elapsed Game Time is at least 120 seconds
Add gas for current player
Like this just add 60 to each trigger!
That's a very inefficent use of triggers for any game that's going to last more than 10 minutes.