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 The Helper:
    Happy Friday Night!
    +1
  • V-SNES V-SNES:
    Happy Friday Night!
    +1
  • The Helper The Helper:
    Going out of a town for the weekend will be back sunday night! Hope everyone has a great weekend!
    +2
  • The Helper The Helper:
    Happy Monday!
  • Ghan Ghan:
    Monday? Speak for yourself. :p
    +2
  • The Helper The Helper:
    Happy Taco Tuesday!
    +1
  • The Helper The Helper:
    Tacos! :)
  • The Helper The Helper:
    Check out the discord for taco pictures :) You cannot put pictures in this chat
    +1
  • The Helper The Helper:
    Damn here come the bots again - 193 online but they are totally invisible to any stats - bunch of bots!'
  • C cubanismo:
    Re: Taco Tuesday, if there were some way to share edible tacos over the internet, technology would be complete.
    +2
  • The Helper The Helper:
    One can only wish!
  • tom_mai78101 tom_mai78101:
    I'm back from Taiwan
    +1
  • The Helper The Helper:
    I am reorganizing the site I know nobody will notice but I am not done quite yet but the main forums order has been changed and there is a new news category in Other News which is all the remaining headline news stuff not categorized - Headline News is just the stuff that shows on the main page now and the news archive is off the main forums page
  • The Helper The Helper:
    and the real archive lives off of headline news
  • The Helper The Helper:
    Happy Monday!
  • V-SNES V-SNES:
    Happy Saturday!
  • The Helper The Helper:
    Happy Saturday Night!

    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