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

My ''Infinite Reincarnation Trick''

Status
Not open for further replies.
Level 18
Joined
May 11, 2012
Messages
2,103
Why does this works only first time?
The second time I die, It doesn't adds the charge to 1....
Please help, I'm being desperate...

  • Shield of Invincibility Aquire
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to |cFFFFFF00Shield of Invicibility
    • Actions
      • Set SOI_Unit[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
      • Set SOI_Item[(Player number of (Owner of (Triggering unit)))] = (Item being manipulated)
      • Trigger - Add to Shield of Invincibility <gen> the event (Unit - SOI_Unit[(Player number of (Owner of (Triggering unit)))]'s life becomes Less than 0.00)
  • Shield of Invincibility
    • Events
    • Conditions
      • (SOI_Item[(Player number of (Owner of (Triggering unit)))] is owned) Equal to True
    • Actions
      • Item - Set charges remaining in SOI_Item[(Player number of (Owner of (Triggering unit)))] to 1
      • Wait 2.00 seconds
      • Item - Set charges remaining in SOI_Item[(Player number of (Owner of (Triggering unit)))] to 0
 
Level 18
Joined
May 11, 2012
Messages
2,103
hmm, now it works finally...
Althought, it's because the first trigger is ran over and over again and it will add lot of events lately. any script to remove the event?

Or, I shouldn't worry about that?

Dude, I need to spread rep first.... sorry, this helped much
 
u should worry about it events leak no matter what. umm i would change this to a periodic trigger that checks every .03 seconds. make one trigger a trigger that adds units to a group when it picks up the item and one trigger that removes from group when item is lost. in the periodic trigger loop through all of the units in the group and check there life. if there dead run the Shield of Invincibility trigger
 
Level 18
Joined
May 11, 2012
Messages
2,103
u should worry about it events leak no matter what. umm i would change this to a periodic trigger that checks every .03 seconds. make one trigger a trigger that adds units to a group when it picks up the item and one trigger that removes from group when item is lost. in the periodic trigger loop through all of the units in the group and check there life. if there dead run the Shield of Invincibility trigger

Nice ;)
 
Level 18
Joined
May 11, 2012
Messages
2,103
Status
Not open for further replies.
Top