• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Couple of questions on dying units

Status
Not open for further replies.
1. Since the player can interact with corpses in my map I have increased the death time for all units to 600 seconds. I've done this because I want the player to be able to loot the corpses for some time after the death occurs. The question is. Can any issues occur by using such a high number?

2. All units are heroes and will (for all I know) be stored in the game data until removed manually. Is this correct?

3. All units also have inventories. The question is what happens with items they carry when those 600 death seconds has passed. Will the items be removed from the game data automatically or do I need to remove them manually?
 
1. I think so, depending on the number of units.
You think? And what do you think? Issues or no issues?

2. How are units heroes?

Heroes are units, and units can be heroes. A unit is a general term. Come on.

3. I think they will be removed automatically when someone unreviveable dies, so it is the same with 600 death time.

You think?

Rheiko said:
for your first question, i think it would be laggy if there's many corpse lying on the ground close to each other.

Hm perhaps. But what is "many"? Because if it's like 50, then it won't be a problem.
 
10 minutes death timer? You better have good reason for that. No matter if unit is alive or not - it still occupies the same amount of memory, it's state is just different.

If there is high amount of units in your map, and if they die frequently only to be replaced by new squads, then yes, your map will be susceptible to lag.

I suggest you should trigger whole process related to your loot-corpse stuff instead.
Unit dies, let's wait a little (so the corpse lies on the ground), pause it and run timer (even mentioned 10 minutes) and which unit is removed. You could use hashtable to set some flag for given corpse enabling the corpse to be looted.

It is probably clearer solution that setting 10 minutes death timers for every unit-type lol.
 
10 minutes death timer? You better have good reason for that. No matter if unit is alive or not - it still occupies the same amount of memory, it's state is just different.

If there is high amount of units in your map, and if they die frequently only to be replaced by new squads, then yes, your map will be susceptible to lag.

There won't. It's no where near a hack and slash map.

I suggest you should trigger whole process related to your loot-corpse stuff instead.
Unit dies, let's wait a little (so the corpse lies on the ground), pause it and run timer (even mentioned 10 minutes) and which unit is removed. You could use hashtable to set some flag for given corpse enabling the corpse to be looted.

It is probably clearer solution that setting 10 minutes death timers for every unit-type lol.

If I just pause the unit it will still be there occupying memory. I mean what's the difference on triggering the removal of the corpse and just letting it disappear automatically?
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
Depends on how many units in your map though, I don't think it will as terrible as guys mentioned here.You have map and you can test anyway.Theorycrafting on hiveworkshop sucks.
 
Depends on how many units in your map though, I don't think it will as terrible as guys mentioned here.You have map and you can test anyway.Theorycrafting on hiveworkshop sucks.

Yeah I am really not that concerned about lag. I was referring to other issues with a high death time. Apparently there are none.

I still would like some concrete answers to question 2 and 3.
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
@2, there is not a (proven) difference between removing a unit manually or let the game itself remove the unit after it decays.False then.

@3, I think someone needs to test that if not done yet.I remember DSG said if you attach a effect to some unit and remove the unit before effect, the effect leaks.Maybe this can be true for items.But need test.
 
@2, there is not a (proven) difference between removing a unit manually or let the game itself remove the unit after it decays.False then.

Alright. Good to know.

@3, I think someone needs to test that if not done yet.I remember DSG said if you attach a effect to some unit and remove the unit before effect, the effect leaks.Maybe this can be true for items.But need test.

I did a quick test.
-Set a variable to an item carried by a unit.
-When -qw was entered it displayed the name of the item stored in the variable.
-After the unit (hero) with the item had died (and dissipated) the item would still be displayed when -qw was entered.
- Entered -as to remove the died unit from the game.
- Afterwards entering -qw would not show the name of the item stored in the variable.

Based on that can I assume the item is completely removed from the game?
 
Yes, the attached effect will leak if not destroyed, no matter that unit was removed.

My idea in regard to triggering corpse stuff was due to effort required to set 600 sec death timer for every unit type.
Instead of being forced to open object editor and set data for every unit, you just do simple trigger to do stuff for you.
By no means it was related to memory..
 
1. Since the player can interact with corpses in my map I have increased the death time for all units to 600 seconds. I've done this because I want the player to be able to loot the corpses for some time after the death occurs. The question is. Can any issues occur by using such a high number?

2. All units are heroes and will (for all I know) be stored in the game data until removed manually. Is this correct?

3. All units also have inventories. The question is what happens with items they carry when those 600 death seconds has passed. Will the items be removed from the game data automatically or do I need to remove them manually?

The only issue that'll occur for that is an issue with every single map where even the best pc won't help and this issue would be over 500 units. It basically depends on the complexity of the object and its data since graphics can lag. If you have 500 of Frank's tanks then it'll be GG for the map. =P

If their rawcodes are capital and they're actual heroes then yes they're there until removed manually.

The items will stay with the hero until sold or dropped or removed with the hero unless you change the inventory ability. I will re-test #3 for you though just in-case because I am wondering myself.
 
The items will stay with the hero until sold or dropped or removed with the hero unless you change the inventory ability. I will re-test #3 for you though just in-case because I am wondering myself.

Please do, and please post your findings here :)


Bannar said:
My idea in regard to triggering corpse stuff was due to effort required to set 600 sec death timer for every unit type.
Instead of being forced to open object editor and set data for every unit, you just do simple trigger to do stuff for you.
By no means it was related to memory..

Oh shocks Colonel. That's not so big an issue. I create most of my units from 2 sketch units I have made for that purpose alone.
 
Status
Not open for further replies.
Top