A ridiculously aggravating problem

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
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)
Second, for units who enter the map
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)

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

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))
And I tried
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))
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!
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
You are saying picked unit when there is no picked unit...
 

Twilight33

New Member
Reaction score
4
picked unit is tied to a spacific even type. no event of the right type in trigger so no value is stored in picked unit.
 
Reaction score
86
Edit: Side note: Damn Losers

Either way, try Triggering unit instead of Picked unit, because no unit is being picked in this case :D
 
B

BlackMage-SL

Guest
Edit: Side note: Damn Losers

Either way, try Triggering unit instead of Picked unit, because no unit is being picked in this case :D

/signed on the lwhole post.

Also, I believe to use the picked unit condition you have to do a "pick all units in unit group and do actions" so its a sub if/then/else condition response only.
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
Pure you are looking to get banned already when you just joined, the mods here can be agressive if u piss them off.

Why is the unit group being destroyed every time a unit enters the playable map area, with it set up like you have it there will only be 1 unit in the unit group at any given time.
 

WolSHaman

knowledgeably ignorant
Reaction score
51
That's all you really need. It adds the even picked unit takes damage with the first two triggers, and then it destroys the unit group, but the unit stays. I tried this and it worked fine after I removed the two red lines, so it works fine with the picked unit thing, if you look in initialization and the other one, it adds the picked unit to the event.
EDIT: Changed the picked unit in the problem line to triggering unit as suggested and it worked fine. Thanks! Just gotta test w/ multiple players now...
 
Reaction score
86
Yes, but it is no longer referred to as Picked Unit. Picked unit is only set during a pick every unit. Basically in the for loop at map initilization, what's being added as an event is this:

Example:
Code:
Footman_0001<gen> takes damage.
Here Footman_0001<gen> was equal to picked unit, but it is no longer the picked unit. Try Triggering Unit, and see if it works.
 

WolSHaman

knowledgeably ignorant
Reaction score
51
Yes, but it is no longer referred to as Picked Unit. Picked unit is only set during a pick every unit. Basically in the for loop at map initilization, what's being added as an event is this:

Example:
Code:
Footman_0001<gen> takes damage.
Here Footman_0001<gen> was equal to picked unit, but it is no longer the picked unit. Try Triggering Unit, and see if it works.

See edit :D
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
when you add the picked unit to the event the actual event will use the unit's id, so you might actualy want to try changeing those to triggering unit.

Edit sorry didn't see your post man.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top