- Joined
- May 16, 2020
- Messages
- 660
Hi guys,
I'm trying to create a shockwave that pulls enemy units in 200 range of the projectile 150 units towards the shockwave and towards the direction of the caster. I spell which captures the basic idea, but not exactly how I want it:
1) Currently, the enemy unit is pulled instantly do the new destination. However, I want the enemies to be moved to the destination over a timeframe, not instantly.
2) Currently, the enemy unit within 200 range of point X is pulled all the way to point X. However, I want to the unit to only travel 150 units towards point X (which is basically "towards the shockwave and towards the caster").
I strongly suspecting that these changes would require a lot more indexes than I currently have, but I don't know how to apply this. Can anyone help please?
I'm trying to create a shockwave that pulls enemy units in 200 range of the projectile 150 units towards the shockwave and towards the direction of the caster. I spell which captures the basic idea, but not exactly how I want it:
1) Currently, the enemy unit is pulled instantly do the new destination. However, I want the enemies to be moved to the destination over a timeframe, not instantly.
2) Currently, the enemy unit within 200 range of point X is pulled all the way to point X. However, I want to the unit to only travel 150 units towards point X (which is basically "towards the shockwave and towards the caster").
I strongly suspecting that these changes would require a lot more indexes than I currently have, but I don't know how to apply this. Can anyone help please?
-
Shockwave
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Shockwave (Magnus)
-
-
Actions
-
Set VariableSet Shockwave_Counts = (Shockwave_Counts + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Shockwave_Counts Greater than Universal_CountMaxSize
-
-
Then - Actions
-
Set VariableSet Shockwave_Counts = 1
-
-
Else - Actions
-
-
Set VariableSet Shockwave_Caster[Shockwave_Counts] = (Triggering unit)
-
Set VariableSet Shockwave_CasterLoc = (Position of Shockwave_Caster[Shockwave_Counts])
-
Set VariableSet Shockwave_TargetPoint = (Target point of ability being cast)
-
Set VariableSet Shockwave_Angle = (Angle from Shockwave_CasterLoc to Shockwave_TargetPoint)
-
Set VariableSet Shockwave_Damage[Shockwave_Counts] = (75.00 x (Real((Level of Shockwave (Magnus) for Shockwave_Caster[Shockwave_Counts]))))
-
Unit - Create 1 Shockwave Projectile for (Owner of Shockwave_Caster[Shockwave_Counts]) at Shockwave_CasterLoc facing Shockwave_Angle degrees
-
Unit - Set the custom value of (Last created unit) to Shockwave_Counts
-
Unit Group - Add (Last created unit) to Shockwave_StartGroup
-
Set VariableSet Shockwave_MaxDistance[Shockwave_Counts] = 1200.00
-
Set VariableSet Shockwave_DistanceTravel[Shockwave_Counts] = 0.00
-
Custom script: set udg_Shockwave_Damaged[udg_Shockwave_Counts] = CreateGroup()
-
Trigger - Turn on Shockwave Loop <gen>
-
Custom script: call RemoveLocation (udg_Shockwave_CasterLoc)
-
Custom script: call RemoveLocation (udg_Shockwave_TargetPoint)
-
-
-
Shockwave Loop
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in Shockwave_StartGroup and do (Actions)
-
Loop - Actions
-
Set VariableSet Shockwave_Projectile = (Picked unit)
-
Set VariableSet Shockwave_CusValue = (Custom value of Shockwave_Projectile)
-
Set VariableSet Shockwave_DummyLoc = (Position of Shockwave_Projectile)
-
Set VariableSet Shockwave_Movement = (Shockwave_DummyLoc offset by 60.00 towards (Facing of Shockwave_Projectile) degrees.)
-
Unit - Move Shockwave_Projectile instantly to Shockwave_Movement
-
Set VariableSet Shockwave_DistanceTravel[Shockwave_CusValue] = (Shockwave_DistanceTravel[Shockwave_CusValue] + 60.00)
-
Set VariableSet Shockwave_UnitGroup = (Units within 200.00 of Shockwave_Movement.)
-
Unit Group - Pick every unit in Shockwave_UnitGroup and do (Actions)
-
Loop - Actions
-
Set VariableSet Shockwave_TempUnit = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Shockwave_TempUnit is A structure) Equal to False
-
(Shockwave_TempUnit is alive) Equal to True
-
(Shockwave_TempUnit belongs to an enemy of (Owner of Shockwave_Caster[Shockwave_CusValue]).) Equal to True
-
(Shockwave_TempUnit has buff Shockwave ) Equal to False
-
(Shockwave_TempUnit is in Shockwave_Damaged[Shockwave_CusValue].) Equal to False
-
-
Then - Actions
-
Unit Group - Add Shockwave_TempUnit to Shockwave_Damaged[Shockwave_CusValue]
-
Set VariableSet Shockwave_TempUnit_X = (X of Shockwave_Movement)
-
Set VariableSet Shockwave_TempUnit_Y = (Y of Shockwave_Movement)
-
Custom script: call SetUnitX(udg_Shockwave_TempUnit, udg_Shockwave_TempUnit_X)
-
Custom script: call SetUnitY(udg_Shockwave_TempUnit, udg_Shockwave_TempUnit_Y)
-
Special Effect - Create a special effect attached to the origin of (Picked unit) using war3mapImported\Void Rift II Orange.mdx
-
Special Effect - Destroy (Last created special effect)
-
Unit - Cause Shockwave_Caster[Shockwave_CusValue] to damage Shockwave_TempUnit, dealing Shockwave_Damage[Shockwave_CusValue] damage of attack type Spells and damage type Magic
-
Unit - Create 1 Dummy (Ground/Speed 1) for (Owner of Shockwave_Caster[Shockwave_CusValue]) at Shockwave_Movement facing Default building facing degrees
-
Set VariableSet Shockwave_Slower = (Last created unit)
-
Unit - Add Shockwave (Slow) to Shockwave_Slower
-
Unit - Order Shockwave_Slower to Human Sorceress - Slow Shockwave_TempUnit
-
Unit - Add a 1.00 second Generic expiration timer to Shockwave_Slower
-
-
Else - Actions
-
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
Shockwave_DistanceTravel[Shockwave_CusValue] Greater than or equal to Shockwave_MaxDistance[Shockwave_CusValue]
-
-
-
-
Then - Actions
-
Unit - Kill Shockwave_Projectile
-
Unit Group - Remove Shockwave_Projectile from Shockwave_StartGroup.
-
Custom script: call DestroyGroup(udg_Shockwave_Damaged[udg_Shockwave_CusValue])
-
-
Else - Actions
-
-
Custom script: call RemoveLocation (udg_Shockwave_DummyLoc)
-
Custom script: call RemoveLocation (udg_Shockwave_Movement)
-
Custom script: call DestroyGroup (udg_Shockwave_UnitGroup)
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in Shockwave_StartGroup) Equal to 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-