• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
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