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

Unit corpses are not units

Status
Not open for further replies.
Level 1
Joined
Jan 17, 2021
Messages
2
Hi guys. I wanna create unit corpse after unit death. So, what i wanna

1) Can i create pernament corpses without create unit? (it's multiplayer map, so excess units are unwelcome)
2) Can i turn on\off corpses for one player? (exmpl he may have poor PC)

Corpses must have minimal impact on memory

GUI\JASS don't care, but i started to learn JASS relatively recently, the most half of my map holding on GUI

(Dead units removing from game after decaying)
 
I'd suggest using special effects and set the current animation to Decay Flesh, and maybe adjust animation time-scale or something.
But I'd say this is probably only needed if you will have a very high amounts of corpses.

The Z location might not be needed. Set the amount to "real1 + 0" and if you feel it works for you, you can remove it with the set real1-part.
You might need to set the time-scale too, or the animation might loop.
You will need to track the special effects and destroy them whenever for want them to, maybe index them in an array and remove them after some time?

  • CorpseSpecialEffect
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set point1 = (Center of (Playable map area))
      • Custom script: set udg_real1 = GetLocationZ(udg_point1)
      • Special Effect - Create a special effect at point1 using units\human\Peasant\Peasant.mdl
      • Special Effect - Set Color of (Last created special effect) to color of (Random player from (All players))
      • Special Effect - Set Position - Z of (Last created special effect) to (real1 + 5.00)
      • Special Effect - Play Special Effect: (Last created special effect), Animation: Decay
      • Special Effect - For Special Effect: (Last created special effect), Add Sub-Animation: Flesh
Why do you not want to use the default corpses?
 
Level 11
Joined
May 29, 2008
Messages
132
1) Using the special effects in ThompZon's answer, you can visually created permanent corpses. That said, these corpses will not be targetable for spells like "raise dead" etc.

2) Corpses cannot be turned off for individual players. Corpses have impact on the games actual functionality. They can be raised, you can select corpses in triggers, and so on. This means they cannot be turned off for a player, as removing corpses for one player in your game would immediately cause them to desync.

If you're worried about corpses impacting player's PC performance, you could set the decay time to be low. The corpses on the field will be removed permanently after that period.
 
Level 1
Joined
Jan 17, 2021
Messages
2
Why do you not want to use the default corpses?

Default corpses is unit how i understand, so i cant use it because on this map too much units. It can cause lags and desync

1) Using the special effects in ThompZon's answer, you can visually created permanent corpses. That said, these corpses will not be targetable for spells like "raise dead" etc.


If you're worried about corpses impacting player's PC performance, you could set the decay time to be low. The corpses on the field will be removed permanently after that period.

This dead units for creating the feeling of a massive massacre, as Warhammer 40k
 
Default corpses is unit...
This dead units for creating the feeling of a massive massacre, as Warhammer 40k

That's correct. Dead units (corpses) are units.

Special effects should work. But it can probably cause lag if too many.
Maybe should have a special effect array for current corpses, delete the oldest body if it's too many (maybe test and see how many is possible to have on screen without lag).
 
Status
Not open for further replies.
Top