Warcraft III resources & community, 2003–2006 · archived

Magical Shot - a new spell of mine .

8 posts
#1

Magical Shot - a new spell of mine .

Tired of the normal arrows ?
Then try Magical Shot , and you will be able to control your arrow ! But remember that the arrow will go extremely fast , and you cannot turn around !


This is the concept ,and i already done much of the spell , but what i miss is making it multi instanceable. It is a damn hard thing to do !
Basically here's the first trigger :

Events :
Unit - An unit start the launch of an ability
Conditions :
(Ability being cast) equal to Magical Shot
Arrowisshot[((Player number of (Owner of (Casting Unit)))]
Actions :
Unit - Create 1 Arrow for (owner of (casting unit)) facing (facing of(casting unit) degrees .
Set PlayerArrow[((Player number of (Owner of (Casting Unit)))] = ( last created unit )
set ArrowIsShot[((Player number of (Owner of (Casting Unit)))] = 1
Unit group - Add ( last created unit ) to Arrows .

-----------------------------
Thats it .
-----------------------------

Second Trigger :


Events :
Time - Every 0.02 seconds of game time
Actions :
Unit Group : Pick every unit in Arrows and do ( multiple actions ) :
....|_ Move ( Picked Unit ) instantly to (( position of (Picked unit) offset facing (facing of (picked unit) towards 35.00 degrees )


-------------------

And now i am triyng to make the movement ( left & right ) of the arrow , but the problem is ...
How do i get the arrow of the player wich has shot, without having no indexes ?


Thank you pe0ple !!
#2
whopps !!

Variables are principally 2 :

Arrowisshot[integer(12index)]
PlayerArrow[Unit(12index)]
#3
i hate UPping , but is needed . Sorry pe0ple
#4
the local handle variables.

If you cannot/Will not/or in any other way are unable to use JASS, the GUI version is Here, though JASS will always be better ^^
#5
???
please explain better Moderator purplepoot :wink: ...
#6
:D

anyways, uuh, yeah, first, you will need some kind of timer array or something.

next, you can use these funcs to "attach" stuff to the timer, and to "retrieve" it at the other end.
#7
like " remember " ? ( it remembers the casting unit )
#8
yeah, like any variable u can imagine... unit, boolean, real, code, player, etc, etc