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