Question about making spell

jubjn209

New Member
Reaction score
0
I have some question:
1. how to move dummy every second in jass
2. how to make this spell: Create a circle arrow (10), right-click to target and arrow will move to clicked target, cause (hero int) damage per arrow.
Please anwser me if u know this, tks very much.
 

afisakov

You can change this now in User CP.
Reaction score
37
1. how to move dummy every second in jass

I decided to reply with an example, in this case dummy moves every 0.03 seconds so it seems a continuous slide, and flies from ability caster in direction cast for fixed time. You will ahve to customize this to what ur going for since your question doesn't specify where you want him to move or for how long.

Code:
function myabilitycast ...
set tp1=GetUnitLoc(GetTriggerUnit())
set mydummy=CreateUnit...dummy
set tp2=GetSpellLoc()
set arangle=AngleBetweenPoints(tp1,tp1)
call RemoveLocation (tp1)
call RemoveLocation (tp2)
call EnableTrigger(udg_trigger196)
call TriggerSleepAction(.5)
call DisableTrigger(udg_trigger196)
endfunction
...
function Trig_per_move takes nothing returns nothing
    if mycondition2() then  
    do effect
    else
        set tp1=GetUnitLoc(mydummy)
        set tp2=PolarProjectionBJ(tp1,12.00,arangle)
        call SetUnitPositionLocFacingLocBJ(mydummy,tp3,tp2)
        call RemoveLocation (tp1)
        call RemoveLocation (tp2)
endfunction
...
    set udg_trigger196=CreateTrigger()
    call DisableTrigger(udg_trigger196)
    call TriggerRegisterTimerEventPeriodic(udg_trigger196,0.03)
    call TriggerAddAction(udg_trigger196,function Trig_per_move)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top