• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Cycloned unit lost on map.

Status
Not open for further replies.
Level 12
Joined
Dec 2, 2016
Messages
733
I have a script that when a player leaves the game the game kills his main unit, and another script that basically detects when the unit is killed and runs another script.

But I found a bug that when the unit is cycloned he can't be found on the map until he returns down. Is there a way to bypass this cyclone placeholder remover and kill the unit while cycloned? Either way even if I just detect the leave and run the other script I still need to kill this unit once he's free'd from the cyclone.

Thanks.
 
Level 7
Joined
Apr 17, 2017
Messages
316
I have a script that when a player leaves the game the game kills his main unit, and another script that basically detects when the unit is killed and runs another script.

But I found a bug that when the unit is cycloned he can't be found on the map until he returns down. Is there a way to bypass this cyclone placeholder remover and kill the unit while cycloned? Either way even if I just detect the leave and run the other script I still need to kill this unit once he's free'd from the cyclone.

Thanks.
Go to Gameplay Constants - Gameplay - Cyclone Hides Unit set it to false
 
Level 12
Joined
Dec 2, 2016
Messages
733
Hey so I'm running into another issue, I need the cyclone to remove the hitbox below while cycloned. Is there an option to do that or is the only way to do that by changing

"Cyclone Hides Unit to True" ?
 
Level 12
Joined
Dec 2, 2016
Messages
733
Or Maybe just turn off the collision of the unit.
Tried it only seems to make the affected unit able to go through buildings yet other units can't pass through.

Not sure if I should ask here or go to the scripting area.

But I basically need to detect when the unit is cycloned, store the unit and kill the unit when he exits the cyclone. Should I just set a timer as long as the cyclone duration and kill the unit once the timer is up? Or is there a better way of doing that?
 
Level 39
Joined
Feb 27, 2007
Messages
5,013
You can auto-kill a unit after X time by giving it an expiration timer. Another possible solution would be to store any unit targeted by cyclone into a unit group and then also kill/remove the appropriate units from that group when your player leave script runs.
 
Status
Not open for further replies.
Top