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

Multi-dummies spell aim

Status
Not open for further replies.
Level 2
Joined
Apr 25, 2015
Messages
9
Hi everyone!!

Im tryin to make a spell that aims at a line (based on Shockwave) and creates 3 or 4 dummies at regular intervals on this line, so they can cast the same spell with very short delay (for dota1 players, like vengful spirit's roar thing). I know how to create and use dummies, but i dont know how to place them on the aiming line, i hope i explained it correctly. I tried something and it ended with the dummies creating with the same angle each time, even if the Hero was aiming the other way. Oh, and i use GUI. Any ideas, precise or not?

Thanks for reading!!
 
Level 21
Joined
Nov 4, 2013
Messages
2,017
You'll have to use the function "Point with polar offset) where offset is the distance. When the hero casts the ability, create a dummy, let it face the target point of ability being cast and record its facing angle. Then remove this dummy. This will make sure that even if your hero is casting the spell behind him, the facing angle will still be correct.

To create the wanted dummies, you can use periodic event. For this, create a real variable called "Distance". When the ability is cast, set Distance to be the "Distance between caster and point where the first dummy will spawn. Every X seconds, you create one dummy at (Position of Caster) offset by (Distance + Y) facing angle (the recorded facing angle). Y is the distance that should be between one dummy and the other. Lastly, you let the dummies cast the wanted spells.

If there's any confusion, tell me and I'll post the triggers.
 
Level 2
Joined
Apr 25, 2015
Messages
9
Thank you very much!! Now this works perfectly. Im glad, im learning everyday since I joined the Hive!!
 
Status
Not open for further replies.
Top