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

[spell] "the arrow" plzz help

Status
Not open for further replies.
Level 13
Joined
Nov 22, 2006
Messages
1,260
Shouldn't this be in the Spells section?

This might be a bit complicated. You have to make a dummy unit first, with a model of an arrow (and raise its flying height to, lets say, 50), and make every other dummy characteristics (locust ability, don't display on minimap....blabla). Set it's speed to 1 (to avoid nasty bugs).

Now, the triggering part. You will move the unit with triggers, move it a bit a time (0.035 periodic trigger) towards the angle between the caster and the target point. Think of a way to check how much it has moved so far, and stop it when it reaches the desired distance (1500 in this case). Now, you will have to have a trigger that has a Unit In Range event, that checks if any unit is close to the arrow, if it is, kill the arrow and do something to the enemy (damage/stun).

Maybe you should have an if/then/else in the trigger which moves the arrow that checks if the arrow is dead (if it is, that means it hit someone) or maybe think of another way to check if the arrow has hit someone.

Final words: if you didn't understand a thing I said, I suggest that you learn how to trigger better. And it also means that asking someone to code a spell for you is not such a good idea.
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
well step by step
1- Create a unit named arrow give him arrow model make it flying unit and give moment speed of 500 and give it locust and storm bolt ability which stuns for 1.5 sec and deals damage you want
2- Create a variable named arrowgroup and make it Unit Group variable and create a variable named arrow and make it Unit
3- Copy the breath of fire and make it arrow spell make spell model none and Available Targets none
4- Create a trigger named arrowcreation and Trigger unit starts effect of arrow ability create unit on casting unit belongs to player of controler of triggering unit faces point of ability being cast and add unit to unit group last created unit to arrow and add experation timer 3 seconds then order it to move to point with ofset center of casting unit x of cos(facing of casting unit)x1500 y of sin(facing of casting unit)x1500
5- Create a trigger periodic event 0.10 sec
Actions Pick every unit in arrowgroup and do actions set {picked unit to arrow {pick every unit in range of 100 range of arrow if picked unit is enemy of arrow {order arrow to cast storm bolt to picked unit and remove arrow}}}

Done
If you dont get it forget create something like that and return to basic things until you get advanced or download a sample of this ability
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
Maybe you should decrease leak variety alot..
Leaks: nearly 100%

How to?

http://www.thehelper.net/forums/showthread.php?t=27219&highlight=Leak
Read this! :p

leaks ? I dont think so it will a bit lag in first cast but if you want to prevent it
just add a trigger map init create arrow give it 1 sec life and it wont lag in first cast then there are soo many leaking spell in dota you cant make this spell not-leaking but there is only one way to prevent it and it is "dont make the spell"

oh sorry you are right and Can I use this for units get locked problem too ?
and its my bad cuz I really dont know anything about custom scripts and JASS may be I should start to learn something
 
Level 16
Joined
Oct 30, 2004
Messages
1,277
I think I'm going to start giving neg rep to the ones who post in the wrong section.

~Thread Moved

I know how you feel. But the people will just go cry to wolve and get their neg rep removed, so why bother in the first place? Ignore the newbs and carry on.

Ontopic: zilogan, do you know any jass? I've made a simple projectile system that does exacly what you want, BUT you would have to trigger the stun-part yourself. It's in jass, so take a look if you can understand it in here.
 
Status
Not open for further replies.
Top