Staredit Network

Staredit Network -> UMS Assistance -> Triggers w/o Wait
Report, edit, etc...Posted by micro119 on 2006-06-10 at 18:25:20
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.
Report, edit, etc...Posted by iHaveNoRegrets on 2006-06-10 at 18:27:26
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.
Report, edit, etc...Posted by micro119 on 2006-06-10 at 18:32:51
How would i use a custom score? can you show using a trigger maybe?
Report, edit, etc...Posted by iHaveNoRegrets on 2006-06-10 at 18:39:01
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.
Report, edit, etc...Posted by micro119 on 2006-06-10 at 18:52:48
CODE
[TRIGGER]
[DESCRIPTION][/DESCRIPTION]
[PLAYERS]
[p]
[/PLAYERS]
[COND]
[c]
[/COND]
[ACTIONS]
[a]
[/ACTIONS]
[/TRIGGER]
Report, edit, etc...Posted by iHaveNoRegrets on 2006-06-10 at 19:02:00
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
Report, edit, etc...Posted by micro119 on 2006-06-10 at 19:13:40
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
Report, edit, etc...Posted by iHaveNoRegrets on 2006-06-10 at 19:15:48
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
Report, edit, etc...Posted by micro119 on 2006-06-10 at 19:32:12
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
Report, edit, etc...Posted by sharf on 2006-06-10 at 19:32:33
you migth already be useing it but can't you use the countdown timer?
Report, edit, etc...Posted by micro119 on 2006-06-10 at 19:36:57
ya im already using it..... but maybe
Report, edit, etc...Posted by sharf on 2006-06-10 at 19:39:48
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.
Report, edit, etc...Posted by iHaveNoRegrets on 2006-06-10 at 19:44:26
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.
Report, edit, etc...Posted by micro119 on 2006-06-10 at 19:51:20
sweet it worked, thanks sharf

ADDITION:
nah i used countdown timer and it worked, thnx for the suggestion tho
Report, edit, etc...Posted by iHaveNoRegrets on 2006-06-10 at 19:53:58
I hope you dont need it in the future. I was avoiding using it for that reason. Good luck with your map.
Report, edit, etc...Posted by sharf on 2006-06-11 at 11:41:15
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
Report, edit, etc...Posted by Mp)7-7 on 2006-06-11 at 11:57:06
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!
Report, edit, etc...Posted by Mini Moose 2707 on 2006-06-11 at 18:54:58
That's a very inefficent use of triggers for any game that's going to last more than 10 minutes.
Next Page (1)