Map trigger question (problem)

Wormbeast

Member!
Joined
May 21, 2005
Messages
20
Reaction score
0
Website
www.wideopenwest.com
I am trying to make a trigger that displays a message ONCE when a person looses a unit. the next round if they die again that message will appear again to everyone. my problem is that the message does not appear. Well, what I should say is that it only appear for red. Can some1 plz help me?





 

HCkev

New Member
Joined
Aug 3, 2008
Messages
3
Reaction score
0
Sorry for the delayed reply, but if you still have troubles with this, this may help you.



The mistake you made is very common. It comes from a misunderstood of how triggers works.


Basically, the entire list of triggers concerning Player 1 is executed first, then after, the entire list of triggers for player 2 is executed, then the triggers for P3, and so on until it reaches the last player. The triggers are not executed for all players at the same time. The first player will always have its triggers fired before other players, so when you call a trigger that should happen for all selected players, you need to make sure that the conditions will still be met even after the trigger is executed.


Your problem here is that the trigger is first executed for player 1. The condition is met, so the triggers are fired: it resets the deaths count, then show the message.

Then after, the conditions for this trigger will be tested for player 2, but the condition will not be met, because you just reseted the counter. Player 2 no longer has deaths of Duke, since the counter is now 0.


To fix this problem, you should use a switch that will be set when the message should be shown(ie. when Player 2 get a Duke killed); then you'll need another trigger that will show the message when the switch is set.


Hope this will help.
 

Jetfusion

BattleForums Junior Member
Joined
Aug 10, 2007
Messages
43
Reaction score
0
Location
NY/HI
Or you could do it this way

Code:
Trigger("All players"){
Conditions:
    Deaths("Player 1", "Terran Marine", Exactly, 1);

Actions:
    Display Text Message(Always Display, "You Have Died");
}

//-----------------------------------------------------------------//
And do this for every person and i am pretty sure it will work
 
Top