• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Turning Unit Damage into a variable?

Status
Not open for further replies.
Level 5
Joined
Apr 8, 2007
Messages
116
Heya, I'm using WEU and GUI, and basically, I'm stumped in trying to find how to turn damage a unit does into a variable in order to implement it in my triggering. In essence, what I'm trying to do is create a trigger where a unit attacks another, and as an action it sets the attacked unit's mana to mana of attacked unit minus the damage done.

However, in browsing options for a "value" to subtract from the attacked unit's mana, the only remotely near way to implement "damage done" was the one named "event - amount of damaged done". The problem here, is that it requires the event to be "damage done/taken", which is only available if I use a specific unit event, whereas in the circumstances of my trigger, it has to be a generic unit event...

...So any ideas on how I might go about doing this?
 
Level 12
Joined
Mar 16, 2006
Messages
992
Heya, I'm using WEU and GUI, and basically, I'm stumped in trying to find how to turn damage a unit does into a variable in order to implement it in my triggering. In essence, what I'm trying to do is create a trigger where a unit attacks another, and as an action it sets the attacked unit's mana to mana of attacked unit minus the damage done.

However, in browsing options for a "value" to subtract from the attacked unit's mana, the only remotely near way to implement "damage done" was the one named "event - amount of damaged done". The problem here, is that it requires the event to be "damage done/taken", which is only available if I use a specific unit event, whereas in the circumstances of my trigger, it has to be a generic unit event...

...So any ideas on how I might go about doing this?

There's an ability called feedback that does exactly that.

Have you ever played the game?
 
Level 5
Joined
Apr 8, 2007
Messages
116
...Yes, and how great that would be, units having an ability named "this ability means this unit hurts enemy morale aka mana when it attacks", and its awesome especially since itll TOTALLY work when I need to use this sytem for affecting only a certain type of unit, riiight. :hohum: Aside from the sarcastic comments, have we got any ideas concerning the question I've asked...?
 
Level 11
Joined
Aug 25, 2006
Messages
971
Hes (Vegavak) got a great point. It'd be easier to trigger that ability to work then to make it from scratch.

Use a hidden spell book to remove the ability icon.

Then when the unit is attacking the certain other unit type, add the ability to that unit. Then remove the ability if it attacks other unit types.

Don't knock other people's ideas until after you've tried them.
 
Level 5
Joined
Apr 8, 2007
Messages
116
Hes (Vegavak) got a great point. It'd be easier to trigger that ability to work then to make it from scratch.

Use a hidden spell book to remove the ability icon.

Then when the unit is attacking the certain other unit type, add the ability to that unit. Then remove the ability if it attacks other unit types.

Don't knock other people's ideas until after you've tried them.

Well then, could you please explain how to use/put in a hidden spell book? Now that you've actually clarified how to do so using an ability, I can understand. But simply saying "use feedback" is as helpful as telling someone who say needed to work out a complex trigger a mere "use triggers"...
 
Status
Not open for further replies.
Top