A little birdy told me that you need to do the following:
General-If(Conditions)thendo(Actions)elsedo(Actions)If(Killingunit)!=NoUnitThenGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If(Ownerof(Killingunit))!=(Ownerof(Triggeringunit))Then// YOUR CODE GOES HERE //Variable-ModifyScore[(Ownerof(Killingunit))]:+1Leaderboard-SetLeaderboarditemtextatcolumn2androw(Ownerof(Killingunit))to(Text(Score[(Ownerof(Killingunit))]))ElseElse
Pay special attention to the operator != (not equal)
Oh there is one more problem. I have visibility trigger that doest run if player kill self.
Events
Unit - Any Unit dies
Local Variables
Conditions
(Unit type of (Triggering unit)) == Sniper
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Killing unit) != No Unit
Then
General - If (Conditions) then do (Actions) else do (Actions)
If
(Owner of (Killing unit)) != (Owner of (Triggering unit))
Then
Variable - Modify Score[(Owner of (Killing unit))]: + 1
Leaderboard - Set Leaderboard item text at column 2 and row (Owner of (Killing unit)) to (Text(Score[(Owner of (Killing unit))]))
UI - Display ((Text (Name of player (Owner of (Killing unit))) with color (Color((Current player (Owner of (Killing unit)) color)))) + (" Killed " + (Text (Name of player (Owner of (Triggering unit))) with color (Color((Current player (Owner of (Triggering unit)) colo for (All players) to Subtitle area
Visibility - Reveal Näytä Sniper Arena for player (Owner of (Triggering unit)) for 32767.0 seconds and Do Not check cliff level
My kill point work well, but there is one problem. If player kill himself, he get point for that too. How prevent get point self kill?
Events
Unit - Any Unit dies
Local Variables
Conditions
(Unit type of (Triggering unit)) == Sniper
Actions
Variable - Modify Score[(Owner of (Killing unit))]: + 1
Leaderboard - Set Leaderboard item text at column 2 and row (Owner of (Killing unit)) to (Text(Score[(Owner of (Killing unit))]))
A little birdy told me that you need to do the following:
Pay special attention to the operator != (not equal)
Its work. Thanks. :)
Oh there is one more problem. I have visibility trigger that doest run if player kill self.
Events
Unit - Any Unit dies
Local Variables
Conditions
(Unit type of (Triggering unit)) == Sniper
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Killing unit) != No Unit
Then
General - If (Conditions) then do (Actions) else do (Actions)
If
(Owner of (Killing unit)) != (Owner of (Triggering unit))
Then
Variable - Modify Score[(Owner of (Killing unit))]: + 1
Leaderboard - Set Leaderboard item text at column 2 and row (Owner of (Killing unit)) to (Text(Score[(Owner of (Killing unit))]))
UI - Display ((Text (Name of player (Owner of (Killing unit))) with color (Color((Current player (Owner of (Killing unit)) color)))) + (" Killed " + (Text (Name of player (Owner of (Triggering unit))) with color (Color((Current player (Owner of (Triggering unit)) colo for (All players) to Subtitle area
Visibility - Reveal Näytä Sniper Arena for player (Owner of (Triggering unit)) for 32767.0 seconds and Do Not check cliff level
Else
Else
Visibility - Reveal Näytä Sniper Arena for player (Owner of (Triggering unit)) for 32767.0 seconds and Do Not check cliff level
Move that down to the first Else.
Thanks again. Didnt thought it work in else.