How to make "If player 1 kills unit(specific unit) that belongs to player 2 than..." I Can't figure this one, I need to be able to specify unit that is not currently present on the map. I cant believe they didn't add a simple condition like Unit killed by Player...
Event:
- Any unit dies
Condition:
- Owner of Triggering Unit == 2
- Owner of Killing Unit == 1
- Triggering Unit == Your specific unit
Action:
- All dance the tango bear.
My Current code:
Events
Unit - Any Unit dies
Local Variables
Conditions
(Owner of (Triggering unit)) == 2
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
Races_Arrey[1] == 1
Then
Player - Modify player (Killing player) Minerals: Add 5
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
Races_Arrey[1] == 2
Then
Player - Modify player (Killing player) Minerals: Add 5
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
Races_Arrey[1] == 3
Then
Player - Modify player (Killing player) Minerals: Add 5
Else
This works fine with one type of unit but if you have more than one type, action activate for each of them, which is obviously BAD.
Quote from s3rius:
Event:
- Any unit dies
Condition:
- Owner of Triggering Unit == 2
- Owner of Killing Unit == 1
- Triggering Unit == Your specific unit
Action:
- All dance the tango bear.
----
Unfortunately that wont work
- Triggering Unit == Your specific unit
In this line I can only choose units that are placed on map and every single unit in my map is created during game so i cant specify it.
How to make "If player 1 kills unit(specific unit) that belongs to player 2 than..." I Can't figure this one, I need to be able to specify unit that is not currently present on the map. I cant believe they didn't add a simple condition like Unit killed by Player...
@mCrayWhoTheFCKTookMyNick: Go
That would be the event not the condition.
Or rather an event that a unit dies and the condition being the killed unit = specified unit.
Event:
- Any unit dies
Condition:
- Owner of Triggering Unit == 2
- Owner of Killing Unit == 1
- Triggering Unit == Your specific unit
Action:
- All dance the tango bear.
My Current code:
Events
Unit - Any Unit dies
Local Variables
Conditions
(Owner of (Triggering unit)) == 2
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
Races_Arrey[1] == 1
Then
Player - Modify player (Killing player) Minerals: Add 5
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
Races_Arrey[1] == 2
Then
Player - Modify player (Killing player) Minerals: Add 5
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
Races_Arrey[1] == 3
Then
Player - Modify player (Killing player) Minerals: Add 5
Else
This works fine with one type of unit but if you have more than one type, action activate for each of them, which is obviously BAD.
Never mind my last post.
Quote from s3rius:
Event:
- Any unit dies
Condition:
- Owner of Triggering Unit == 2
- Owner of Killing Unit == 1
- Triggering Unit == Your specific unit
Action:
- All dance the tango bear.
----
Unfortunately that wont work
- Triggering Unit == Your specific unit
In this line I can only choose units that are placed on map and every single unit in my map is created during game so i cant specify it.
Conditions
(Unit type of (Triggering unit)) == Marine
Thanks everyone that works perfectly now.
Variable UNIT = "Unit from Unit group" > Units in Region Matching Condition > Unit Type (Your unit), Region: Entire map, Player 2.