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!
I'm making a spell that summons a rock and throws it at the target.
I'm using the item method of checking pathing.
The rock is only supposed to be destroyed if it hits a doodad.
Whenever a rock goes onto raised terrain the rock is destroyed?
Is there a way to prevent this?
Do I have to add a Z coordinate?
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in TempGroup) Greater than or equal to 1
Then - Actions
Special Effect - Create a special effect at TempPoint using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
Special Effect - Destroy (Last created special effect)
Unit - Remove Unit from the game
Unit Group - Pick every unit in TempGroup and do (Unit - Cause Unit to damage (Picked unit), dealing 150.00 damage of attack type Spells and damage type Universal)
Else - Actions
Custom script: set udg_X = GetLocationX(udg_TempPoint2)
Custom script: set udg_Y = GetLocationY(udg_TempPoint2)
I can't seem to figure out the problem... I've tried multiple things but I suppose I could just use move unit instantly. However, I'm using this pathing checker on multiple spells...
The issue is that when the rock is on terrain that isn't flat (raised terrain tool or lower terrain tool) it is destroyed... (X and Y change??)
I edited the spell a little bit and decided to try broadening the range a little, however it was to little effect.
Consider this a bump.
If anyone has any answers, here's the full trigger, points of interest are marked.
I bold the trigger because I think it's hard to read at times.
Rock Formation
Events
Unit - A unit Begins channeling an ability
Conditions
(Ability being cast) Equal to Rock Formation
Actions
Set TempInt = (Player number of (Owner of (Triggering unit)))
Set RF_Caster[TempInt] = (Triggering unit)
Set RF_Point[TempInt] = (Position of RF_Caster[TempInt])
Set RF_Timer[TempInt] = 4.00
Set RF_Percentage[TempInt] = 0.00
Set RF_AngleSetupRan[TempInt] = False
Set RF_Tracker[TempInt] = 0
Special Effect - Create a special effect attached to the origin of RF_Caster[TempInt] using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
Special Effect - Destroy (Last created special effect)
Custom script: if udg_RF_Group[udg_TempInt] == null then
Custom script: set udg_RF_Group[udg_TempInt] = CreateGroup()
Custom script: endif
Rock Formation Loop
Events
Time - Every 0.05 seconds of game time
Conditions
Actions
For each (Integer LoopIndex[5]) from 1 to 12, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
RF_Timer[LoopIndex[5]] Greater than 0.00
Then - Actions
Set RF_Timer[LoopIndex[5]] = (RF_Timer[LoopIndex[5]] - 0.05)
Set RF_Percentage[LoopIndex[5]] = (RF_Percentage[LoopIndex[5]] + 1.25)
Set RF_Tracker[LoopIndex[5]] = (RF_Tracker[LoopIndex[5]] + 1)
Floating Text - Create floating text that reads ((String(RF_Percentage[LoopIndex[5]])) + %) above RF_Caster[LoopIndex[5]] with Z offset 10.00, using font size 10.00, color (50.00%, 50.00%, 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 0.06 seconds
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
RF_Tracker[LoopIndex[5]] Equal to 16
RF_Tracker[LoopIndex[5]] Equal to 32
RF_Tracker[LoopIndex[5]] Equal to 48
RF_Tracker[LoopIndex[5]] Equal to 64
RF_Tracker[LoopIndex[5]] Equal to 80
Then - Actions
Set TempPoint = (Position of RF_Caster[LoopIndex[5]])
Set TempPoint2 = (Random point in (Rect centered at TempPoint with size (750.00, 750.00)))
Special Effect - Create a special effect attached to the origin of RF_Caster[LoopIndex[5]] using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect attached to the origin of RF_Caster[LoopIndex[5]] using Abilities\Spells\Items\TomeOfRetraining\TomeOfRetrainingCaster.mdl
Special Effect - Destroy (Last created special effect)
Unit - Create 1 Rock Formation(Dummy) for (Owner of RF_Caster[LoopIndex[5]]) at TempPoint2 facing Default building facing (270.0) degrees
Unit Group - Add (Last created unit) to RF_Group[LoopIndex[5]]
Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
Special Effect - Destroy (Last created special effect)
Set TempGroup = (Units within 2500.00 of TempPoint matching ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of RF_Caster[LoopIndex[5]])) Equal to True)))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in TempGroup) Equal to 0
Then - Actions
Set RF_Timer[LoopIndex[5]] = 0.00
Set RF_Timer2[LoopIndex[5]] = 0.00
Floating Text - Create floating text that reads No Targets In Range... above RF_Caster[LoopIndex[5]] with Z offset 10.00, using font size 10.00, color (50.00%, 50.00%, 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 1.00 seconds
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Else - Actions
Custom script: call DestroyGroup(udg_TempGroup)
Else - Actions
Set RF_DummyArray[LoopIndex[5]] = 0
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
RF_Timer2[LoopIndex[5]] Greater than 0.00
Then - Actions
Set RF_Timer2[LoopIndex[5]] = (RF_Timer2[LoopIndex[5]] - 0.05)
Unit Group - Pick every unit in RF_Group[LoopIndex[5]] and do (Actions)
Loop - Actions
Set Unit = (Picked unit)
Set RF_DummyArray[LoopIndex[5]] = (RF_DummyArray[LoopIndex[5]] + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit is alive) Equal to True
Then - Actions
Set TempPoint = (Position of Unit)
Set TempPoint2 = (TempPoint offset by 30.00 towards RF_Angle[RF_DummyArray[LoopIndex[5]]] degrees)
Set TempGroup = (Units within 50.00 of TempPoint matching ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of RF_Caster[LoopIndex[5]])) Equal to True)))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in TempGroup) Greater than or equal to 1
Then - Actions
Special Effect - Create a special effect at TempPoint using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
Special Effect - Destroy (Last created special effect)
Unit - Remove Unit from the game
Unit Group - Pick every unit in TempGroup and do (Unit - Cause Unit to damage (Picked unit), dealing 150.00 damage of attack type Spells and damage type Universal)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.