Hi,
This spell is meant to cause the user to bounce around un-controllably for a while, dealing damage when it reaches each location.
Anyway the issue lies where sometimes the user flies to the center of the map (or near it) rather than moving to a nearby location. The main issue with this is that I have been put on the side of a cliff because of this. Any ideas?
This spell is meant to cause the user to bounce around un-controllably for a while, dealing damage when it reaches each location.
Anyway the issue lies where sometimes the user flies to the center of the map (or near it) rather than moving to a nearby location. The main issue with this is that I have been put on the side of a cliff because of this. Any ideas?
-
BoH Cast
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Ball of Happiness
-
Actions
- Trigger - Run Challenges The D <gen> (checking conditions)
- Set BoH_MaxIndex = (BoH_MaxIndex + 1)
- Set BoH_CasterUnit[BoH_MaxIndex] = (Triggering unit)
- Set BoH_Bounces[BoH_MaxIndex] = (4 + (((Level of Ball of Happiness for (Triggering unit)) - 1) / 2))
- Set BoH_Dmg[BoH_MaxIndex] = ((750.00 + (750.00 x (Real((Level of Ball of Happiness for (Triggering unit)))))) + ((Real((Agility of (Triggering unit) (Include bonuses)))) x 5.00))
- Set BoH_TargetPoint[BoH_MaxIndex] = (Target point of ability being cast)
- Set TempPoint = (Position of (Triggering unit))
- Unit - Create 1 Dummy (Ball of Happiness) for (Owner of (Triggering unit)) at TempPoint facing Default building facing degrees
- Set BoH_DummyUnit[BoH_MaxIndex] = (Last created unit)
- Custom script: call RemoveLocation(udg_TempPoint)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- BoH_MaxIndex Greater than or equal to 1
-
Then - Actions
- Trigger - Turn on BoH Loop <gen>
- Else - Actions
-
If - Conditions
-
Events
-
BoH Loop
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
For each (Integer BoH_LoopInt) from 1 to BoH_MaxIndex, do (Actions)
-
Loop - Actions
- Set TempPoint = (Position of BoH_CasterUnit[BoH_LoopInt])
- -------- Move --------
- Unit - Turn collision for BoH_CasterUnit[BoH_LoopInt] Off
- Set TempPoint2 = (TempPoint offset by 20.00 towards (Angle from TempPoint to BoH_TargetPoint[BoH_LoopInt]) degrees)
- Unit - Move BoH_CasterUnit[BoH_LoopInt] instantly to TempPoint2, facing BoH_TargetPoint[BoH_LoopInt]
- Unit - Move BoH_DummyUnit[BoH_LoopInt] instantly to TempPoint2, facing BoH_TargetPoint[BoH_LoopInt]
- Custom script: call RemoveLocation(udg_TempPoint2)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Distance between TempPoint and BoH_TargetPoint[BoH_LoopInt]) Less than or equal to 20.00
- (Terrain pathing at TempPoint of type Walkability is off) Equal to True
- (BoH_CasterUnit[BoH_LoopInt] is dead) Equal to True
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
- -------- Explode --------
- Special Effect - Create a special effect at TempPoint using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
- Special Effect - Destroy (Last created special effect)
- Set TempUnitGroup = (Units within 350.00 of TempPoint matching ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) is an enemy of (Owner of BoH_CasterUnit[BoH_LoopInt])) Equal to True)))
-
Unit Group - Pick every unit in TempUnitGroup and do (Actions)
-
Loop - Actions
- Unit - Cause BoH_DummyUnit[BoH_LoopInt] to damage (Picked unit), dealing BoH_Dmg[BoH_LoopInt] damage of attack type Spells and damage type Universal
-
Loop - Actions
- Custom script: call DestroyGroup(udg_TempUnitGroup)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
And - All (Conditions) are true
-
Conditions
- (BoH_CasterUnit[BoH_LoopInt] is alive) Equal to True
- BoH_Bounces[BoH_LoopInt] Greater than or equal to 1
-
Conditions
-
And - All (Conditions) are true
-
Then - Actions
- -------- Bounce --------
- Custom script: call RemoveLocation(udg_BoH_TargetPoint[udg_BoH_LoopInt])
- Set BoH_TargetPoint[BoH_LoopInt] = (TempPoint offset by (Random real number between 250.00 and 400.00) towards (Random angle) degrees)
- Set BoH_Bounces[BoH_LoopInt] = (BoH_Bounces[BoH_LoopInt] - 1)
-
Else - Actions
- -------- Overwrite Index --------
- Unit - Turn collision for BoH_CasterUnit[BoH_LoopInt] On
- Unit - Kill BoH_DummyUnit[BoH_LoopInt]
- Set BoH_Bounces[BoH_LoopInt] = BoH_Bounces[BoH_MaxIndex]
- Set BoH_CasterUnit[BoH_LoopInt] = BoH_CasterUnit[BoH_MaxIndex]
- Set BoH_Dmg[BoH_LoopInt] = BoH_Dmg[BoH_MaxIndex]
- Set BoH_DummyUnit[BoH_LoopInt] = BoH_DummyUnit[BoH_MaxIndex]
- Custom script: call RemoveLocation(udg_BoH_TargetPoint[udg_BoH_LoopInt])
- Set BoH_TargetPoint[BoH_LoopInt] = BoH_TargetPoint[BoH_MaxIndex]
- Set BoH_LoopInt = (BoH_LoopInt - 1)
- Set BoH_MaxIndex = (BoH_MaxIndex - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- BoH_MaxIndex Equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
-
If - Conditions
- Floating Text - Create floating text that reads FUNZ at TempPoint with Z offset 0.00, using font size (Random real number between 15.00 and 25.00), color ((Random real number between 0.00 and 100.00)%, (Random real number between 0.00 and 100.00)%, (Random real number between 0.00 and 100.00)%), and 0.00% transparency
- Floating Text - Change (Last created floating text): Disable permanence
- Floating Text - Change the lifespan of (Last created floating text) to 4.00 seconds
- Floating Text - Change the fading age of (Last created floating text) to 3.00 seconds
- Floating Text - Set the velocity of (Last created floating text) to (Random real number between 50.00 and 100.00) towards (Random angle) degrees
- Else - Actions
-
If - Conditions
- Custom script: call RemoveLocation(udg_TempPoint)
-
Loop - Actions
-
For each (Integer BoH_LoopInt) from 1 to BoH_MaxIndex, do (Actions)
-
Events