• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Spell Effects

Status
Not open for further replies.
Level 3
Joined
Feb 16, 2008
Messages
40
i'm trying to make a knockback spell, but i want to make a line of special effect to it, like creating a line of Chain Lightning <Target> as it knocks back the unit being targeted.
 
Level 3
Joined
Dec 22, 2007
Messages
35
if you could only be a bit more vague so we can help you better, that would be great


:razz::razz::xxd::xxd::grin::grin:




edit: sarcasm aside, here are some questions so we can better help you:

Are you familiar with jass? If so, how good are you with it? Are you just trying to do the special effects to an already completed knockback spell - or have you not done any of the spell yet? Give us some more context, if you have some code for the spell, post it so we can see where you're currently at.
 
Level 3
Joined
Feb 16, 2008
Messages
40
ohkay, i want to make a special effect for my spell. the special effect is a line of Chain Lightning <target> (look at it in WE). i want to learn how to make those kinds of things. if you've played games like naruto 3rd shinobi wars and use naruto's rasengan then you would know what i'm aiming for. :thumbs_up:
 
he means that when you use the knockback then the leave a effect(in shinobi wars its a line or rocks breaking as the unit is moving backwars)what type do u want?(its under event-special effects create btw)
V. A simple knockback spell (not MUI!)

You need a unit-targeted spell only from the object editor, so I’ll describe the trigger part only.
We need two triggers for this:
Knockback
  • Events
  • Unit - A unit Starts the effect of an ability
  • Conditions
  • (Ability being cast) Equal to Knockback
  • Actions
  • Set Caster = (Triggering unit)
  • Set Target = (Target unit of ability being cast)
  • Set LoopCounter = 0
  • Trigger - Turn on KnockbackMove <gen>
  • This trigger fires when the spell is cast, stores the two participants (caster, target) into a variable, and turns on the second trigger that moves the target away from the caster.
  • LoopCounter is an integer variable that counts how many times the “movement-trigger” runs. Be sure to set it to 0 in this trigger!
  • KnockbackMove
  • Events
  • Time - Every 0.02 seconds of game time
  • Conditions
  • Actions
  • Set TempLoc00 = (Position of Caster)
  • Set TempLoc01 = (Position of Target)
  • Set TempLoc02 = (TempLoc01 offset by 5.00 towards (Angle from TempLoc00 to TempLoc01) degrees)
  • Unit - Move Target instantly to TempLoc02
  • Custom script: call RemoveLocation(udg_TempLoc00)
  • Custom script: call RemoveLocation(udg_TempLoc01)
  • Custom script: call RemoveLocation(udg_TempLoc02)
  • Set LoopCounter = (LoopCounter + 1)
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • LoopCounter Greater than 50
  • Then - Actions
  • Trigger - Turn off (This trigger)
  • Else - Actions
This may be confusing at first sight. As you see, this trigger runs every 0.02 seconds. It’ll move the target from point to point, so it will perform a smooth slide.
Line-by-line description:
1. line: We store the location of the caster.
2. line: We store the location of the target.
3. line: We calculate the point where the unit should be moved. For this, we use ‘Point With Polar Offset’. It declares a point from the following parameters: a base point, an offset value, a degree.
4. line: With that action, we move the target to the next point (TempLoc[2]) in the slide movement.
5/6/7. line: Removing location leaks.
8. line: Add 1 to the counter variable (LoopCounter)
9. line: Checks if LoopCounter reached the appropriate value (here 50) and disables the movement-trigger to stop the unit sliding.

Each time this trigger runs (50 times a second), the target is moved away from the caster with 5 units. So we must count how many times this trigger should run:

max distance of the move / move-range per one trigger-run

(In this case: 250/5 = 50)

OR

Test
  • Events
  • Unit - A unit starts the effect of an ability
  • Conditions
  • (Ability being cast) Equal to <Some Spell>
  • Actions
  • Set Caster = (Triggering unit)
  • Set Target = (Target unit of ability being cast)
  • Set Distance = (400 + (100 x (Ability level of <Some Spell> for Caster)))
  • Set Angle = (Facing angle of Caster)
  • Set Duration = 2
  • Custom script: call Knockback(udg_Target, udg_Distance, udg_Angle * bj_DEGTORAD, udg_Duration)
THIS IS ONLY THE TRIGGER FOR A NORMAL KNOCKBACK NO SPECIAL EFFECTS
 
Status
Not open for further replies.
Top