- Joined
- Jan 9, 2024
- Messages
- 74
I'm having some problems creating a trigger that gives a reward to a player after a specific unit is killed. The main problem I have is that the reward can only be obtained once per player. (The map has 6 Players)
I already made a trigger that seems to work but not all the time!
I already made a trigger that seems to work but not all the time!
-
arena kills T1
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
(Unit-type of (Dying unit)) Equal to Broll Bearmantle (Night Elf Form)
-
-
Actions
-
For each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of (Killing unit)) Equal to (Player((Integer A)))
-
-
Then - Actions
-
Set VariableSet arena_kills_count_1[(Integer A)] = (arena_kills_count_1[(Integer A)] + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
arena_kills_count_1[(Integer A)] Equal to 1
-
-
Then - Actions
-
Game - Display to (Player group((Player((Integer A))))) the text: Reward - 750 XP
-
Hero - Add 750 experience to player_unit[(Player number of (Owner of (Killing unit)))], Show level-up graphics
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
-
-