WolSHaman
knowledgeably ignorant
- Reaction score
- 51
I'm working on an ability called Rage. When activated, it causes all enemies to attack this hero (taunt). After 3 seconds, the hero damages all enemies in the vicinity equal to .65 times the damage received while enraged. The trigger is not working. It is all working but one condition, and I do not know what's wrong with it. Here are the two things I have tried, but neither work:
First, the damage setup triggers:
Map initialization
Second, for units who enter the map
Now, here's the trigger that checks when the player is enraged
Now, whenever the unit takes damage, this is where it adds to the final amount. This is also the part where it bugs up. I have tried two things. Here they both are. (the code that interferes is in red)
1.
And I tried
2.
And the damage release part works fine. However, for some reason when I add the condition in red, the map doesn't detect the damaged unit. Why is this? Thanks for any help you can provide!
First, the damage setup triggers:
Map initialization
Melee Initialization
Events
Map initialization
Conditions
Actions
Set newunits = (Units in (Playable map area))
Unit Group - Pick every unit in newunits and do (Actions)
Loop - Actions
Trigger - Add to Rage buildup <gen> the event (Unit - (Picked unit) Takes damage)
Set playerhero[1] = Keeper of the Grove 0002 <gen>
Custom script: call DestroyGroup (udg_newunits)
Events
Map initialization
Conditions
Actions
Set newunits = (Units in (Playable map area))
Unit Group - Pick every unit in newunits and do (Actions)
Loop - Actions
Trigger - Add to Rage buildup <gen> the event (Unit - (Picked unit) Takes damage)
Set playerhero[1] = Keeper of the Grove 0002 <gen>
Custom script: call DestroyGroup (udg_newunits)
Unit enter update
Events
Unit - A unit enters (Playable map area)
Conditions
Actions
Custom script: call DestroyGroup (udg_newunits)
Unit Group - Add (Last created unit) to newunits
Unit Group - Pick every unit in newunits and do (Actions)
Loop - Actions
Trigger - Add to Rage buildup <gen> the event (Unit - (Picked unit) Takes damage)
Events
Unit - A unit enters (Playable map area)
Conditions
Actions
Custom script: call DestroyGroup (udg_newunits)
Unit Group - Add (Last created unit) to newunits
Unit Group - Pick every unit in newunits and do (Actions)
Loop - Actions
Trigger - Add to Rage buildup <gen> the event (Unit - (Picked unit) Takes damage)
Now, here's the trigger that checks when the player is enraged
Rage
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Rage
Actions
Set playerenraged[(Player number of (Owner of (Triggering unit)))] = True
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Rage
Actions
Set playerenraged[(Player number of (Owner of (Triggering unit)))] = True
Now, whenever the unit takes damage, this is where it adds to the final amount. This is also the part where it bugs up. I have tried two things. Here they both are. (the code that interferes is in red)
1.
Rage buildup
Events
Conditions
(Picked unit) Equal to playerhero[(Player number of (Owner of (Picked unit)))]
playerenraged[(Player number of (Owner of (Picked unit)))] Equal to True
Actions
Game - Display to (All players) the text: hit
Set rageamount[(Player number of (Owner of (Picked unit)))] = (rageamount[(Player number of (Owner of (Picked unit)))] + (Damage taken))
Events
Conditions
(Picked unit) Equal to playerhero[(Player number of (Owner of (Picked unit)))]
playerenraged[(Player number of (Owner of (Picked unit)))] Equal to True
Actions
Game - Display to (All players) the text: hit
Set rageamount[(Player number of (Owner of (Picked unit)))] = (rageamount[(Player number of (Owner of (Picked unit)))] + (Damage taken))
2.
Rage buildup
Events
Conditions
((Picked unit) is A Hero) Equal to True
playerenraged[(Player number of (Owner of (Picked unit)))] Equal to True
Actions
Game - Display to (All players) the text: hit
Set rageamount[(Player number of (Owner of (Picked unit)))] = (rageamount[(Player number of (Owner of (Picked unit)))] + (Damage taken))
Events
Conditions
((Picked unit) is A Hero) Equal to True
playerenraged[(Player number of (Owner of (Picked unit)))] Equal to True
Actions
Game - Display to (All players) the text: hit
Set rageamount[(Player number of (Owner of (Picked unit)))] = (rageamount[(Player number of (Owner of (Picked unit)))] + (Damage taken))