| 11-05-2003, 11:45 AM | #1 |
WHat exactly is the best way to remove units after they die? I've heard people say just Remove them. i've heard them say that removing them keeps them in RAM. some say explode them. Does anyone know a way to actually remove them from RAM? Or am i just stuck with them until the end of the game? |
| 11-05-2003, 11:48 AM | #2 |
explode works fine. if you want to make it look like removed, hide it before exploding it for heroes, if you dont want the icon in the upper left to show up after you explode it, change its owner to neutral passive before exploding |
| 11-05-2003, 11:50 AM | #3 |
yep explosions is the way to go... oh I didn't know about that hero thing. That will be nice to know. |
| 11-05-2003, 02:10 PM | #4 |
I think it is a strange question... If u wanna delete a unit with no death animation then: remove If u wanna kill a unit with death animation: kill If u wanna kill a unit with an explosion: explode |
| 11-05-2003, 02:20 PM | #5 |
memory wise: Remove is the same as hiding the unit without assigning a pointer so that it can be retrieved. (It can still be reteived if you assigned a variable to the unit you removed). Explode: Gets rid of the corpse meaning there is no interlude stage where its changed to a corpse. Probably less memory intensive then remove as you can't restore the unit. Kill: Easily the most memory intensive, you can restore the unit and it turns to a corpse meaning there is amiddle man stage before it goes to nothingness... Edit; There is no command in jass to do manual garbage collection. Your best bet is try to intiate the emergency garbage collect in war3. (Ever play a game and it gets REALLY REALLY LAGGY then it suddenly stops lagging completely? Guess whos to blame? Your ISP? The hosts ISP? Nope. mr. Emergency Garbage Collect) The way to do that is to waste an offensive amount of memory. (Good way give a guy with a very rapid attack the ability to purge on attack on a gigantic model.) The problem with this is A) It creates an offensive bout of lag. B) Theres no way in Jass to tell if the collects been done. C) Emergency Garbage collect is natorious to fail (The Memory can not be read error...this is the cuase!) |
| 11-05-2003, 03:01 PM | #6 |
@voi we were talking about from a memory standpoint. It is better to explode a unit than remove or kill. Hiding then exploding shows up as a removal in the game but doesn't same a memory of the removed unit. |
| 11-05-2003, 03:05 PM | #7 |
um hiding is as memory intensive as removing...BECAUSE THEY ARE ONE AND THE SAME. Actually hiding is more memory intensive because it assigns a pounter to the newly hid unit. |
| 11-05-2003, 03:58 PM | #8 |
if you explode the unit after you hide it the memory used to hide the unit is cleared |
| 11-05-2003, 04:42 PM | #9 | |
Quote:
Is this true Weaadar??? If so, this would be great.... |
| 11-05-2003, 04:44 PM | #10 |
Im confused...Still, Nice to Know removing units actually takes up memory...I gotta remember it to avoid doing this in my maps... |
| 11-05-2003, 05:18 PM | #11 |
Thanks for all the responses. Seem as if explode is the way to go. I have tried remove before and that only leads to long map unload times. thanks again. |
| 11-05-2003, 06:26 PM | #12 |
You could also move the unit to a remote region and then kill it. That is what i do, I never knew that you could hide it then kill it though, that will be a big help. |
| 11-05-2003, 06:30 PM | #13 |
Is there any reason why Blizzard programmed unit removal to still use memory? It just seems a bit stupid. If you wanted the unit gone but get-back-able then you should just hide it. |
| 11-05-2003, 06:36 PM | #14 |
Most likely it is a program error that they never got around to fixing. Or maybe it saves the point value of a unit of something, I am not good with that type of stuff so I really dont know. But I am betting on program error. |
