• 🏆 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!

[Trigger] Leak Fix

Status
Not open for further replies.
Level 7
Joined
Mar 13, 2008
Messages
228
How do I get ridd of these leaks:
  • Respawn
    • Events
      • Unit - A unit owned by Player 11 (Dark Green) Dies
    • Conditions
    • Actions
      • Set DyingUnit = (Unit-type of (Dying unit))
      • Set PositionUnit = (Position of (Dying unit))
      • Wait 15.00 seconds
      • Unit - Create 1 DyingUnit for (Owner of (Dying unit)) at PositionUnit facing (Random real number between 0.00 and 360.00) degrees
When I kill a unit before the dying unit spawns it spawns the mob I killed second.
 
Level 23
Joined
Nov 29, 2006
Messages
2,482
Well first of all, dont use "dying unit". Use triggering unit instead.
Second, you dont need to set "dyingunit" = unittype of dying unit
Third, Set PositionUnit will work best to be set after the wait.
Fourth, Here is the trigger with destroyed leaks =)


  • Respawn
    • Events
      • Unit - A unit owned by Player 11 (Dark Green) Dies
    • Conditions
    • Actions
      • Wait 15.00 seconds
      • Set PositionUnit = (Position of (Triggering unit))
      • Unit - Create 1 (Unit-type of Triggering unit) for (Owner of (Triggering unit)) at PositionUnit facing (Random real number between 0.00 and 360.00) degrees
      • Custom script - call RemoveLocation( udg_PositionUnit )
Hope that helps
/regards

Also a suggestion would be to use 15 seconds polled wait instead of normal wait.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Yeah, it is bad.
What Eccho posted works but only if there are corpses and corpses stay for more than 15 seconds.
P.s. It is not 15 seconds, because Wait is very inaccurate
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Absolutely :)
You did good(would have done the same thing) ;)
But he must know.
P.s. I tried repping you, but I must spread :D
 
Status
Not open for further replies.
Top