• 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.

2 spells

Status
Not open for further replies.
Level 5
Joined
Feb 6, 2009
Messages
96
hey everybody i would like to make two spells...
one spell is a shot of an archer an the more mana he has the more dmg he makes... can somebody tell me how you can do that

and the other spell is a shot where you shot and it stuns/roots the target for a random amount of time and that depends also on your mana


(The mana what you have not the Maximum Mana)
 
Yet another easy problem for me to fix.

For the arrow ability makeadummy ability of the 'shot' which targets a unit, something like the one the mountain king has (don't remember exact name)

Make a dummy unit which has no model file,and deals 1 damage, make the desired projectil it's attack projectile and match the speeds as well as range.
Then in the tiggers.
At the start of the map create a hashtable

Use the event 'unit begins the effect of a spell'
set a location variable to the position of the casting unit, create the dummy, give it a short duration, order it to attack the unit (make sure it can only get 1 shot in)
now, save an integer variable to the currant mana of unit (triggering unit) as 1 of (last created unit)
save the triggering unit as 2 of (last created unit)
remove the location variable.

then use the event function 'unit takes damage' (I beleive there was one like this) or maybe 'unit deals damage'
make (load 2 of unit (damaging unit) deal (load 1 of unit (damaging unit) to (attacked unit)

done.

A similar thing for the other exept you probably will need to pause the unit and give it a stun sfx or something, I'm a little tired so this mihgt be a little off or unefficiant or whatever they call it now.
 
Status
Not open for further replies.
Top