• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 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!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

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,020
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