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

Mass Raise Dead

Status
Not open for further replies.
Level 2
Joined
Feb 16, 2020
Messages
4
Hi all,

I would like to create a mass "Raise Dead" in an area with the effects of the undead spawning as they do with spell, but I'm a bit stumped.

My questions is:
- is it possible to "cast spells" from a trigger event without the actual unit that casts it?

Thanks

EDIT: removed second corpse create question. Found it
 
Level 39
Joined
Feb 27, 2007
Messages
4,994
- is it possible to "cast spells" from a trigger event without the actual unit that casts it?
You must use a dummy unit to cast the spell. Create dummy for owner of caster, give it an expiration timer of 1-3 seconds, order it to cast spell. Basically:
  • Copy any normal unit
  • Remove all its abilities, then give it "Locust" and "Invulnerable (Neutral)"
  • Set its minimap display to off
  • Remove its shadow and model
  • Set food used to 0
  • Set blend time, cast point, and cast backswing to 0
  • Remove its Art - Special
  • Set max pitch/roll angles to 0
  • Keep whatever movement type it has but set its speed base to 0
  • Remove its gold bounty
  • Give it max mana and mana regen
  • Set sight radius to 0
  • Remove all unit classifications
  • Set can flee to false
Some of these may be unnecessary depending on what you copied from; I based mine on a Wisp. If you are extra lazy you can copy the dummy caster from my attached map. This setup with speed base of 0 will allow the unit to instantly cast any spell as long as its in range. Normally you can't order a dummy to cast and then immediately order it to cast again because the dummy needs to turn to face the target, but here it no longer has to do that so by the time that line of code is processed it has already cast. Pretty neat.
 

Attachments

  • ModularMouseSpells v1.2.w3x
    66.7 KB · Views: 20
Level 2
Joined
Feb 16, 2020
Messages
4
You must use a dummy unit to cast the spell. Create dummy for owner of caster, give it an expiration timer of 1-3 seconds, order it to cast spell. Basically:
  • Copy any normal unit
  • Remove all its abilities, then give it "Locust" and "Invulnerable (Neutral)"
  • Set its minimap display to off
  • Remove its shadow and model
  • Set food used to 0
  • Set blend time, cast point, and cast backswing to 0
  • Remove its Art - Special
  • Set max pitch/roll angles to 0
  • Keep whatever movement type it has but set its speed base to 0
  • Remove its gold bounty
  • Give it max mana and mana regen
  • Set sight radius to 0
  • Remove all unit classifications
  • Set can flee to false
Some of these may be unnecessary depending on what you copied from; I based mine on a Wisp. If you are extra lazy you can copy the dummy caster from my attached map. This setup with speed base of 0 will allow the unit to instantly cast any spell as long as its in range. Normally you can't order a dummy to cast and then immediately order it to cast again because the dummy needs to turn to face the target, but here it no longer has to do that so by the time that line of code is processed it has already cast. Pretty neat.

First off, thanks for your reply! Much appreciated.

(btw I tried your map while I was at it, that missile skill is really cool)

Second, I tried what you told me and it ALMOST works, there's just one problem. For some reason the computer player refuses to use it !! (even if I set it on auto)

Let me give some further detail:

In my map I do not use AI scripts (melee or otherwise), I'm using the dummy caster as you suggested and I was using a customer "Raise Dead" Ability without a cool down

Things I noted:
- if dummy caster is set to "user" player or "none" player it works fine
- if dummy caster is set to a "computer" player it starts playing up, and I think it is related to some default AI

Scenarios I tried with Computer Player:
- if dummy caster is assigned the custom ability it does NOT work (I imagine there is some AI that does not list the skill in the unit's list of possible actions)
- if dummy caster is assigned the standard ability it does work, but ONLY if the unit is not set to locust/ghost (again, I think this is because there is some AI that only fires the spells when they are "detected"/"selectable")
- Auto-Cast or not made zero difference

Thanks again for the help
 
Level 2
Joined
Feb 16, 2020
Messages
4
You cannot just give the dummy the ability and hope it casts for you (with autocast on or not). You actually have to order it to cast the spell at a location you choose.

Okay. I've set the event to cast the spell. And it works like a charm for any kind of player, but again it does not work for Computer players :/

upload_2020-2-27_22-29-42.png
 
Status
Not open for further replies.
Top