HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

RemoveUnit() Alternative

01-12-2008, 09:52 PM#1
Karawasa
I've heard that
Collapse JASS:
call RemoveUnit(u)

is the devil, why this is so I'm not 100% sure. At any rate, I decided to try this instead:
Collapse JASS:
call ShowUnit(u,false) 
call KillUnit(u)

Seems to function in-game the same way (i.e. the unit just vanishes into thin air). Are there any problems with what I'm doing?
01-12-2008, 10:14 PM#2
Vexorian
Not that I know.
01-12-2008, 10:17 PM#3
Karawasa
Nice, thanks.
01-12-2008, 10:24 PM#4
xombie
What are the problems with RemoveUnit?
01-12-2008, 10:28 PM#5
Vexorian
None if you don't attach stuff to it.

Not like it is any useful to just remove the unit instead of killing it first.
01-12-2008, 11:06 PM#6
Karawasa
What exactly does Hide do in terms of game mechanics? Will the tower still decay etc.?
01-12-2008, 11:58 PM#7
The Elite
it will still decay, you just cant see it
01-13-2008, 12:42 AM#8
DioD
this unsafe, if you want to remove units just move them to place none can see.
01-13-2008, 02:08 AM#9
Ammorth
How is it unsafe?
01-13-2008, 03:17 AM#10
Tide-Arc Ephemera
I apologize if I'm stealing the topic, but are there any downsides to using call ShowUnit(u,false) ?
01-13-2008, 04:12 AM#11
Vexorian
Quote:
Originally Posted by Ammorth
How is it unsafe?
It isn't.
01-13-2008, 05:04 AM#12
darkwulfv
It seems RemoveUnit() is only 'unsafe' if you like attaching things to every freaking unit and then remove one. Something about recycling the attachment or something. I doubt it's something anyone but cohadar or a hardcore Jasser needs to worry about.
01-13-2008, 09:49 AM#13
cohadar
cohadar is probably the last one that has to worry about it...
01-13-2008, 12:17 PM#14
rain9441
Quote:
Originally Posted by Tide-Arc Ephemera
I apologize if I'm stealing the topic, but are there any downsides to using call ShowUnit(u,false) ?

All I know is if you ShowUnit(u,false) then ShowUnit(u,true) it seems to reset certain characteristics. EG If you turned off pathing and hide/show'd it it'd have pathing back on, and theres some method of moving creep camps that involves hide/show.