hello what trigger is when i cast a spell the caster will move random point of position of the target ??
how about when the caster cast the ability and every 0.03 seconds he moves random point of targetSomething like this?
- Random Blink
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to BlinkAbility
- Actions
- =========================================
- ============Use either of these two============
- Set temppoint = (Position of (Target unit of ability being cast))
- Set temppoint = (Target point of ability being cast)
- =========================================
- Set temppoint2 = (temppoint offset by (Random real number between 50.00 and 150.00) towards (Random angle) degrees)
- Set unitXreal = (X of temppoint2)
- Set unitYreal = (Y of temppoint2)
- Custom script: call SetUnitY(GetTriggerUnit(), udg_unitYreal)
- Custom script: call SetUnitX(GetTriggerUnit(), udg_unitXreal)
- Custom script: call RemoveLocation(udg_temppoint)
- Custom script: call RemoveLocation(udg_temppoint2)
This would look very strange as the unit would appear to move every 2-3 frames in a discontinuous way.how about when the caster cast the ability and every 0.03 seconds he moves random point of target
how about when the caster cast the ability and every 0.03 seconds he moves random point of target
I have Example For You
- Untitled Trigger 001
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Avatar
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Y Equal to 0
- Then - Actions
- Trigger - Turn on Untitled Trigger 002 <gen>
- Else - Actions
- Set Y = (Y + 1)
- Set Unit[Y] = (Triggering unit)
- Set BlinkCount[Y] = 4
- Set Duration[X] = 0.30
- Untitled Trigger 002
- Events
- Time - Every 0.03 seconds of game time
- Conditions
- Actions
- For each (Integer X) from 1 to Y, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- BlinkCount[Y] Less than or equal to 0
- Then - Actions
- Set Unit[X] = No unit
- Set X = (X - 1)
- Set Y = (Y - 1)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Y Equal to 0
- Then - Actions
- Trigger - Turn off (This trigger)
- Skip remaining actions
- Else - Actions
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Duration[X] Less than or equal to 0.00
- Then - Actions
- Set BlinkCount[X] = (BlinkCount[X] - 1)
- Set Duration[X] = 1.00
- Set Region[X] = (Region centered at (Position of Unit[X]) with size (400.00, 400.00))
- Set TempPoint = (Random point in Region[X])
- Special Effect - Create a special effect at TempPoint using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
- Special Effect - Destroy (Last created special effect)
- Unit - Move Unit[X] instantly to TempPoint
- Custom script: call RemoveLocation( udg_TempPoint)
- Else - Actions
- Set Duration[X] = (Duration[X] - 0.30)