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

Unit becomes non-responsive after expiration timer given

Status
Not open for further replies.
Level 14
Joined
Aug 30, 2004
Messages
909
This is an odd little problem, and I just spent 2 hours debugging a previous one, so I'm a little spent. I thought maybe someone here would have a good idea before I ripped my map apart looking for it.

((by the way, for future reference...do not make your dummy units have the "float" movement type, as when you make them near water they will sometimes appear in weird spots. It took me 2 hours to find out why my spear was being thrown from 30 feet away toward the water))

Here's my problem:

I have a dummy unit called "net thrower" who pops up when I need him to cast Ensnare on an enemy unit: tempDamageShip (in this case, a neutral passive unit). It works fine, except that the dummy unit hangs around a bit after he is needed. So I put an expiration timer on him. When I do that...the dummy unit no longer casts on the target. I put the expiration timer to 60 seconds, and it still prevents him from casting on the target. "u" is a different unit that triggers the ensnare. Here's the code in the trigger:

  • Unit - Create 1 _NetCaster for Neutral Hostile at tempPoint facing Default building facing degrees
  • Unit - Order (Last created unit) to Orc Raider - Ensnare tempDamagedShip
  • Unit - Add a 60.00 second Generic expiration timer to (Last created unit)
  • Unit - Add a 0.01 second Generic expiration timer to u
  • Custom script: call RemoveLocation (udg_tempPoint)
  • Skip remaining actions
Keep in mind it all works fine if I leave out the "add a 60 second Generic expiration timer" line. But when it's included the unit no longer ensnares the target (though it will ensnare hostile targets).

I imagine I can work around this by playing with the object data (give him negative hp regen) but I thought the pros used expiration timers a lot...and this bug seems like something I ought to know.

EDIT: apparently it has something to do with the fact that the dummy NetCaster was for Neutral Hostile...when I made it Neutral Passive it no longer refuses its order.
 
Level 14
Joined
Aug 30, 2004
Messages
909
where's U?

Unit u is right there. Basically, u is the missile (a net) that flies through the air using a custom move system. When it reaches the target, I summon up the generic unit and order it to ensnare the target. I kill u so the net missile doesn't keep flying. I changed it so the dummy unit isn't Neutral Hostile and that appears to have solved it. I really don't understand, but I suppose it's not a real problem for me.
 
Status
Not open for further replies.
Top