Help With Fire Spin Spell

Hero

─║╣ero─
Reaction score
250
In need help with an ability that makes a fire spin around a unit...the only thing i don't get is how do i make the Fireball unit spin around a target unit...
 

Rad

...
Reaction score
228
Well you can do something like

Code:
Event
     Time - Every .2 seconds of the game
Condition
     (FireDur) greater than 0
Action
     If/Then/Else
          If (Boolean - (FireTarget) is alive equal to True)
          Then do nothing
          Else
               Unit - Remove (Fireball) from the game
               Set (FireDur) = 0.00
               Trigger - Turn off (This trigger)
               Skip remaining actions
     Set (FireTargP) = (Position of (FireTarget)
     Set (FireDur) = ((Fire Dur) - .2)
     [i]Set (FireAngle) = ((FireAngle) + 22.5[/i]
     Unit - Move (Fireball) instantly to ((FireTargP) offset by 120 towards (FireAngle))
     Unit - Make (Fire) damage (FireTarget) for 4 damage using attack type Chaos and damage type Normal
     Custom Script - call RemoveLocation(udg_FireTargP)

Free-typed so theres probrably something left out... The duration and target etc are set when you cast the spell. The variables are:

FireDur - Duration (Real)
FireTarget - Target unit of the ability (Unit)
Fire - The fireball dummy unit (Unit)
FireTargP - Position of the target (Point)
FireAngle - Angle for the Fire to move to (Real)

Also, depending on how it looks you may want to make it face a certain angle also. Dealing 4 damage every .2 seconds is 20 damage per second...

EDIT~Values in italic are added in (Forgot the angle)
 

Hero

─║╣ero─
Reaction score
250
You left out a variable....i don't know what (FireAngle) is unless u mean the facing angle of the Fireball Unit....

Thx though.....but i needa know what (FireAngle) equals to...
 

Rad

...
Reaction score
228
FireAngle is just an angle used for the position its moved to, it goes up 22.5 (Half of 45, which is half of 90, which is half of 180, which is half of 360... so it moves slow and is 1/16 of 360)

You dont have to set FireAngle, its probrably a good idea to nullify all the variables in that If/Then/Else though (So they dont carry over from the last spell)

EDIT~If you want to make it face an angle when you move (So it isnt just moving it looks like its actually spinning) use this:

Code:
Unit - Make (Fire) face (FireAngle + 90) over .2 seconds

That means when the fireball is at angle 0 from the target, it faces 90 degress. When its at 45, it faces 135... it will always face forward that way (Unless the variable goes down then its backwards)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top