• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Passive "Raise Dead"

Level 6
Joined
Mar 28, 2018
Messages
128
I want to make a passive that revives the corpses that are left on the ground when someone dies. after reviving a corpse to be a skeleton and come to my hero and stay at a distance of 500 if someone attacks me or the skeletons, activate and attack. the thing is that I want to make a passive of 4 levels and for each level to increase by 2 until it reaches level 4 and revives 8 skeletons.
passive to activate only at a distance of 1000 from the corpse on the ground and not to be stuck to each other. to stay in a certain formation like I'm the middle of a square and they stay on each side of that square... the thing is that if they all stay close to me or to each other, I end up blocking the ally. what do you think of my idea? it seems a bit complicated to me :))
 
Level 13
Joined
Nov 4, 2006
Messages
1,239
so, just to be clear, you want the skeletons to be raised whenever your hero is within 1000 of a corpse, and then have the skeleton take a position in a formation like this (example):
1696524466091.png

and then basically mimic your movement unless somebody attacks you or them?
 
Level 13
Joined
Nov 4, 2006
Messages
1,239
i mean the first part is not to difficult, you run a trigger every 0.2 seconds or so that revives all the corpses around your hero until the threshold is reached and order them to take a position offset of your hero based on angle, distance and number.

you can theoretically also use the same each time your hero is issued an order and target the point with the same offset for each skeleton for movement.

The difficult part is the being attacked thing and what happens if you send the skeletons around yourself. you could give them locust to have them unselectable, but that would also make them invulnerable

Maybe someone else has an idea how to solve that. I might have some time tomorrow to create a basic version and maybe you can go from there
 
Level 13
Joined
Nov 4, 2006
Messages
1,239
so, i made a basic spell that does in general what you want, although likely not the most efficient way

However, there are several tweaks necessary depending on what you want to final result to be:
  • spell is currently not MUI and i did not go through any leak fixes
  • skeletons that die will respawn, but not take the correct position, you need to go through the index when they die and set the correct number for the next spawn
  • there are several options to optimize the order mirroring, depending on what you want, i suggest play around with the different orders, the general idea is always the same as shown in the map

hope this still helps
 

Attachments

  • summon spell.w3x
    21.1 KB · Views: 4

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,583
Here's a version similar to UreDe4D's map but using a Unit Indexer to make everything MUI. I also made sure to address the memory leaks and added some extra steps to improve efficiency by avoiding functions like "Number of units in Unit Group". Unit Groups can be expensive to create/enumerate over so any optimizations can go a long way.

The attached map requires the latest patch to open. When testing, press the escape key to summon a corpse and then walk the Lich near it.

There are some rules you must follow to use the Unit Indexer correctly. Read about them in the link or one of my many other posts about it :p
 

Attachments

  • Raise Dead Passive 1.w3m
    28.3 KB · Views: 3
Last edited:
Level 17
Joined
Apr 13, 2008
Messages
1,597
I think the formation part is an unnecessary drain on the system (unless you insist). And it can also look really weird.
I have a similar spell and there I just check every second if the distance between raised unit and the hero is within, I don't know 400, and if not, then I order the raised unit to move to a random location within 300 distance of the hero.
 
Top