Hero Spell Help!

Suigestu

New Member
Reaction score
2
Status: NOT RESOLVED

I need help with a spell, i need the targeted unit to get pushed back over a time interval *like 2 seconds* 500 distance. Im having trouble cause its moving immidiently.
my 2 triggers didnt work they got teleported either right next to the hero, or somewhere random in a 300 aoe.
Cyclone 1=Position of the ability being cast
Cyclone 2=Position of unit being cast + (1,0)
Cyclone 3=Target unit
Cyclone 4=Integer value

Code:
faeafea
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        ((Triggering unit) is A Hero) Equal to True
    Actions
        Set Cyclone3 = (Target unit of ability being cast)
        Set Cyclone1 = (Position of Cyclone3)
        Trigger - Turn on Knockback <gen>

and

Code:
Knockback
    Events
        Time - Every 0.02 seconds of game time
    Conditions
    Actions
        Unit - Move Cyclone3 instantly to Cyclone2
        Set Cyclone4 = (Cyclone4 + 1)
        If (Cyclone4 Equal to 500) then do (Trigger - Turn off (This trigger)) else do (Do nothing)
 

Vulcansurge

Ultra Cool Member
Reaction score
27
Where did you set the variable cyclone2? Remember you shouldn't set it as the default value in the variable editor because its likely not to work.

Shouldnt you set it every 0.02 seconds in the knockback trigger?
 

Suigestu

New Member
Reaction score
2
>Where did you set the variable cyclone2? Remember you shouldn't set it as the default value in the variable editor because its likely not to work.

the default value is 0, its still not working

>Shouldn't you set it every 0.02 seconds in the knockback trigger?

isnt it already set?
 

Suigestu

New Member
Reaction score
2
Code:
feafeaq
    Events
        Time - Every 0.02 seconds of game time
    Conditions
    Actions
        [B]Set Cyclone2 = (Cyclone1 offset by 500.00 towards (Facing of (Triggering unit)) degrees)[/B]
        Unit - Move Cyclone3 instantly to Cyclone2
        Set Cyclone4 = (Cyclone4 + 1)
        If (Cyclone4 Equal to 500) then do (Trigger - Turn off (This trigger)) else do (Do nothing)

only works once, even if it does its still glitchy


>and where did u set the variable cyclone 2?
I set it here
Code:
Set Cyclone2 = (Cyclone1 offset by 500.00 towards (Facing of (Triggering unit)) degrees)
 

waaaks!

Zinctified
Reaction score
256
works once? maybe this bugs...because every 0.02 seconds...you move the unit with a polar offset of "500" and only stops the trigger after 500 times of moving the unit?

that means
the unit will move 250000 away from ur unit....try changing this
Code:
Set Cyclone2 = (Cyclone1 offset by [B]500.00[/B] towards (Facing of (Triggering unit)) degrees)
to this
Code:
Set Cyclone2 = (Cyclone1 offset by [B]10.00[/B] towards (Facing of (Triggering unit)) degrees)
 

Suigestu

New Member
Reaction score
2
still doesnt work

Code:
feafeaq
    Events
       [B] Time - Every 0.01 seconds of game time[/B]
    Conditions
    Actions
        Set Cyclone2 = (Cyclone1 offset by [B]1.00[/B] towards (Facing of (Triggering unit)) degrees)
        Unit - Move Cyclone3 instantly to Cyclone2
        Set Cyclone4 = (Cyclone4 + 1)
        If (Cyclone4 Equal to [B]300[/B]) then do (Trigger - Turn off (This trigger)) else do (Do nothing)
 

cleeezzz

The Undead Ranger.
Reaction score
268
set Cyclone2 = (Cyclone1 offset by 1.00 towards (Facing of (Triggering unit)) degrees)

are you sure that pushes back? seems like it goes forward.

i think you should use .03 seconds, from what i saw on this forum, .03 seconds is faster than your eye.

explain what doesn't work. like what happens when you test it.
 

PiCkstix

New Member
Reaction score
18
Code:
Knockback
    Events
        Time - Every 0.02 seconds of game time
    Conditions
    Actions
        Unit - [COLOR="Red"]Move Cyclone3 instantly to Cyclone2[/COLOR]
        Set Cyclone4 = (Cyclone4 + 1)
        If (Cyclone4 Equal to 500) then do (Trigger - Turn off (This trigger)) else do (Do nothing)

>Move Cyclone3 instantly to Cyclone2 - the unit is instantly moving.
>What you could do it make it move TOWARDS Cyclone2 over periods of 50 offset unit 500 distance. In this case it will "Slide" 10 times until it gets there...
 

13lade619

is now a game developer :)
Reaction score
398
...i didn't look at the posts above...
Code:
faeafea
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        ((Triggering unit) is A Hero) Equal to True

what's this? it triggers whenever any hero uses an ability?
i think the target of ability is not recognized in the trigger.

Code:
feafeaq
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        Set Cyclone2 = (Cyclone1 offset by 1.00 towards (Facing of (Triggering unit)) degrees)
        Unit - Move Cyclone3 instantly to Cyclone2
        Set Cyclone4 = (Cyclone4 + 1)
        If (Cyclone4 Equal to 300) then do (Trigger - Turn off (This trigger)) else do (Do nothing)

cyclone1 is only declared once, meaning the unit only moves to one point.
declare cyclone1 in the periodic knockback trigger.

create a real type variable and use it to determine the angle from caster to target, it would be more efficient.

and oh, the code leaks extremely.
 
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