I have circular regions attached to each unit in game. I have a trigger set up to add owner's of units that enter each region to be put into an associated player group.
Event: Any Unit Enters Region "Player 1 Unit"
Action: Player Group - Add player (Owner of (Triggering Unit)) to "Player Group - Region [1]
(A trigger for when the unit leaves the above region it is removed from the player group is also used.)
Now, I'd like to have it when a unit dies in this region for it to send a message to every player in the above player Group that says "Unit Owned by Triggering Unit was killed in Region Player 1 Unit"
I have tried Event "any unit dies" and "Unit Leaves Region" but I can't figure out what conditions to use to check to see if the unit is in the player group attached to the region. I took a week off working on this game so it could be my noobness...
Logically, your setup is somewhat messy. All units in the game have a region attached. And so, [Unit 1 Owner] will add [Unit 2 Owner] to a Player Group, but at the same time [Unit 2 Owner] will add [Unit 1 Owner] to a unit group. Now the same two Players are in two different unit groups. Which unit group should be checked against?
Why use regions? You can use the Event: "Unit Enters/Leaves Range Of Unit".
You need Unit Groups, not Player Groups for the above purpose. You might need the Player Groups for something else, but not in the above case.
SC2MapsterEventsUnit-AnyUnitdiesLocalVariablesConditions((Triggeringunit)isinRegion[1])==TrueActionsUI-Display(Combine("Unit of ",(Nameofplayer(Triggeringplayer))," got killed by ",(Nameofplayer(Killingplayer))))forPlayerGroup-Region[1]toSubtitlearea
I have circular regions attached to each unit in game. I have a trigger set up to add owner's of units that enter each region to be put into an associated player group.
Event: Any Unit Enters Region "Player 1 Unit"
Action: Player Group - Add player (Owner of (Triggering Unit)) to "Player Group - Region [1]
(A trigger for when the unit leaves the above region it is removed from the player group is also used.)
Now, I'd like to have it when a unit dies in this region for it to send a message to every player in the above player Group that says "Unit Owned by Triggering Unit was killed in Region Player 1 Unit" I have tried Event "any unit dies" and "Unit Leaves Region" but I can't figure out what conditions to use to check to see if the unit is in the player group attached to the region. I took a week off working on this game so it could be my noobness...
Thanks in advanced
@Ryat20: Go
Logically, your setup is somewhat messy. All units in the game have a region attached. And so, [Unit 1 Owner] will add [Unit 2 Owner] to a Player Group, but at the same time [Unit 2 Owner] will add [Unit 1 Owner] to a unit group. Now the same two Players are in two different unit groups. Which unit group should be checked against?
Why use regions? You can use the Event: "Unit Enters/Leaves Range Of Unit".
You need Unit Groups, not Player Groups for the above purpose. You might need the Player Groups for something else, but not in the above case.
Maybe this can help?