Hello. I have created a spell where you use impale and then travel to the of the impale range. This works perfectly fine and all except when I want to stop this player from flying around the map haxing his way through all walls, doors and other obstacles. So my question is: How do I make a trigger to detect the pathing type of a line between the caster and the casting point? This is how far Ive come:
As you can see the trigger is quite sloppy and I will fix that later (so dont tell me to avoid waits and things like that)
This would work (I believe) if I only wanted to be stopped by cliffs but because the pathing condition does not count destructibles and doodads when checking if the terrain is walkable or not this is the only thing that will stop me.
Try to make sense of my rambling and then help me if you can. Thanks in advance.
(Also Im not sure if you can use a loop that way but I tested with a long chain of if then else aswell and that didnt work either)
-
Admirals Assault
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Admirals Assault
-
Actions
- Set AACaster = (Triggering unit)
- Set AALevel = (Level of Admirals Assault for (Triggering unit))
- Set AAPoint = (Position of (Triggering unit))
- Set AAFacing = (Facing of (Triggering unit))
- Set AAPoint = (AAPoint offset by 50.00 towards AAFacing degrees)
- Unit - Create 1 AAdummy for (Owner of AACaster) at AAPoint facing Default building facing degrees
- Set AADummy = (Last created unit)
- Unit - Add a 1.00 second Generic expiration timer to AADummy
- Unit - Set level of AABuff for AADummy to AALevel
- Unit - Order AADummy to Orc Shaman - Bloodlust AACaster
-
For each (Integer A) from 1 to 8, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Terrain pathing at AAPoint of type Walkability is off) Equal to True
-
Then - Actions
- Set AAPoint = (AAPoint offset by 50.00 towards (180.00 - AAFacing) degrees)
- Skip remaining actions
-
Else - Actions
- Set AAPoint = (AAPoint offset by 50.00 towards AAFacing degrees)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Wait 0.10 seconds
- Unit - Move AACaster instantly to AAPoint, facing AAFacing degrees
- Special Effect - Create a special effect at AAPoint using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
- Custom script: call RemoveLocation(udg_AAPoint)
-
Events
This would work (I believe) if I only wanted to be stopped by cliffs but because the pathing condition does not count destructibles and doodads when checking if the terrain is walkable or not this is the only thing that will stop me.
Try to make sense of my rambling and then help me if you can. Thanks in advance.
(Also Im not sure if you can use a loop that way but I tested with a long chain of if then else aswell and that didnt work either)