Staredit Network

Staredit Network -> UMS Assistance -> [SOLVED]Conversion to HyperTrigs
Report, edit, etc...Posted by luisv on 2006-07-21 at 16:58:43
Ok, I'm converting my map to "hyper trigger environment", but I have had to change quite a few triggers to make it all work right. However I am stuck with one.. The original trig is like this:

For: FORCE1

CONDITION

CountDownTimer is at least 119 Sec
CountDownTimer is at most 120 Sec
CurrentPlayer Accumulates AtLeast 1 ore
CurrentPlayer Accumulates AtMost 4000 ore

ACTION

Mofify Score: CurrentPlayer to Add 1500
Preserve Trigger



This map is a Diplomacy map. Now, this trigger is NOT a city trig but is supposed to take place right around the same time. With Hypers this trig will execute what 16 times? I need it to go ONCE for each player IF they meet the criteria. This trig is meant for 7 human players so that is why I cannnot use a switch since it would only fire for 1 player. Is there a way to make this work without having to make this trigger for each player and THEN using switches so it only lauches once for them? I have lots of these and it'd take years to make "7" of each for each human player... HELP! helpsmilie.gif
Report, edit, etc...Posted by The_Shattered_moose on 2006-07-21 at 17:36:10
Ok, instead of using switches, have it set deaths for current player, your trigger would look like this:
For: FORCE1

CONDITION

CountDownTimer is at least 119 Sec
CountDownTimer is at most 120 Sec
CurrentPlayer Accumulates AtLeast 1 ore
CurrentPlayer Accumulates AtMost 4000 ore
CurrentPlayer has suffered exactly 0 deaths of unit (make it something unused)
ACTION

Modify Score: CurrentPlayer to Add 1500
Set deaths of unit (same unit as in conditions, this unit cannot be in use in the game) for current player to 1
Preserve Trigger

You would also then need another trigger, which clears the deaths after the time interval to add the minerals is over. For the sake of this trigger, I'm assuming that the countdown timer continues beyond the money giving interval. If it doesn't, replace the times with whatever they will be after the conditions for money giving are over.
Trigger:
Conditions:
CountDownTimer is at least 121 Sec
Current player has suffered at least 1 deaths of unit (same unit here)
Actions:
Set deaths of unit (still the same unit here) to 0 for current player.
Preserve trigger

That should do it.
Report, edit, etc...Posted by dumbducky on 2006-07-21 at 17:42:27
Using Force one will make the trigger run for every person in that force. You might want to change it to the players in that force, it will run only when they meet the conditions.
Report, edit, etc...Posted by luisv on 2006-07-21 at 20:03:31
That would work if one person met that condition but what if 3 players met that condition? I'd need them all to get the exact 1500 Points each.
Report, edit, etc...Posted by The_Shattered_moose on 2006-07-21 at 20:26:06
It works for as many players as you need--tell me where you are getting the idea that it only works for one person, the death count is set for current player, therefor, any number of players can trigger it.
Also, It works much better to check individual players in your case, rather than force 1, as the trigger would fire if ANYONE in force 1 fufilled the conditions, for everyone.
So instead of checking force 1, check the players in the force.
Report, edit, etc...Posted by Kenoli on 2006-07-22 at 00:15:20
QUOTE(The_Shattered_moose)
Also, It works much better to check individual players in your case, rather than force 1, as the trigger would fire if ANYONE in force 1 fufilled the conditions, for everyone.
So instead of checking force 1, check the players in the force.
Checking a force is exactly the same as checking each player on that force. There is no difference.
Report, edit, etc...Posted by luisv on 2006-07-22 at 01:07:40
Oh ok. I get it now. I knew Force1 obviously applied to all the players in Force1, but I just was worried that in the death trigger (since it used 1 specific unit in the death counter) that if 3 players reached the trig's conditions at the same time it might not work or whatever. But with a 2 second gap in the conditions, that should be MORE than enough time for the trigger to execute for all 3 (or more) players without a problem!

I guess, this problem is solved! YAY biggrin.gif
Report, edit, etc...Posted by Kenoli on 2006-07-22 at 01:17:45
QUOTE(luisv)
I just was worried that in the death trigger (since it used 1 specific unit in the death counter) that if 3 players reached the trig's conditions at the same time it might not work or whatever.
There is a death count for each unit for each player, and you can set them independently of eachother.
This makes them useful for player-specific switches.
Report, edit, etc...Posted by MoonlighTurtle on 2006-07-22 at 01:19:29
QUOTE
Oh ok. I get it now. I knew Force1 obviously applied to all the players in Force1, but I just was worried that in the death trigger (since it used 1 specific unit in the death counter) that if 3 players reached the trig's conditions at the same time it might not work or whatever. But with a 2 second gap in the conditions, that should be MORE than enough time for the trigger to execute for all 3 (or more) players without a problem!


Three people reaching the condition at the same time wouldn't be possible, the triggers conditions are checking the player that's running the trigger anyway

Yet without the 2 or even a 1 second gap there would be a problem relating to the players individually, not as a whole. If both triggers conditions were set to the same time it would definitely cause a problem, because as the triggers cycled through 8 times in that one second, each time it would set deaths to 1 and reset it to 0, looping over again within the same second. Since it's all within the same second, the second trigger's actions would make the first trigger's death condition true again.
Next Page (1)