• 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.

Create a new item when that hero owns Mask Of Death / when that hero is below 50% health?

Status
Not open for further replies.
Level 5
Joined
May 8, 2020
Messages
87
I want to create one when the hero is holding Mask Of Death and is attacked with less than 50% health, which will delete Mask Of Death and create a new version of Mask Of Death v2
 
Level 5
Joined
May 8, 2020
Messages
87
I want when holding Mask of Death and being attacked with less than 50% health to create a 2nd version of Mask of Death ( not on the ground )
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
  • Events
    • Unit - A unit acquires an item
  • Conditions
    • (Item-type of (Item being manipulated)) equal to Mask of Death
  • Actions
    • Unit - Add (Triggering Unit) to DEATH_GROUP
  • Events
    • Unit - A unit loses an item
    • Unit - A unit pawns an item (to shop)
  • Conditions
    • (Item-type of (Item being manipulated)) equal to Mask of Death
  • Actions
    • Unit - Remove (Triggering Unit) from DEATH_GROUP
  • Events
    • Unit - A unit About to take damage
  • Conditions
    • ((Triggering unit) is in DEATH_GROUP) equal to True
    • ((Percentage life) of (Triggering Unit)) less than or equal to 50.00 //I think this function returns in the range 0-100 not 0-1.0, but it might need to be changed
  • Actions
    • Hero - Create Mask of Death v2 and give it to (Triggering unit)
I don't think this is what you actually want to do, though, which is why I asked. Do you simply want the Mask item to work differently (have different numbers) when the unit holding it has less than 50% HP? Say maybe only 10% life steal when above 50%, but 30% life steal when below 50%?
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,875
  • Events
    • Unit - A unit acquires an item
  • Conditions
    • (Item-type of (Item being manipulated)) equal to Mask of Death
  • Actions
    • Unit - Add (Triggering Unit) to DEATH_GROUP
  • Events
    • Unit - A unit loses an item
    • Unit - A unit pawns an item (to shop)
  • Conditions
    • (Item-type of (Item being manipulated)) equal to Mask of Death
  • Actions
    • Unit - Remove (Triggering Unit) from DEATH_GROUP
  • Events
    • Unit - A unit About to take damage
  • Conditions
    • ((Triggering unit) is in DEATH_GROUP) equal to True
    • ((Percentage life) of (Triggering Unit)) less than or equal to 50.00 //I think this function returns in the range 0-100 not 0-1.0, but it might need to be changed
  • Actions
    • Hero - Create Mask of Death v2 and give it to (Triggering unit)
I don't think this is what you actually want to do, though, which is why I asked. Do you simply want the Mask item to work differently (have different numbers) when the unit holding it has less than 50% HP? Say maybe only 10% life steal when above 50%, but 30% life steal when below 50%?
I'm almost certain he wants the Item to bounce between two different forms.

v1 when above 50% hp, and v2 when below 50% hp. So basically what you have now, but when you acquire either Mask v1 or Mask v2 it should do a life % check and alter forms if necessary -> Remove old item + Create new item. Your damage event should also Remove v1 as well.

Also, I don't think this Event is necessary:
  • Unit - A unit pawns an item (to shop)
"Loses an item" should fire when that happens as far as I know.
 
Status
Not open for further replies.
Top