[Solved] Detecting Pathability Issue (Items are considered notwalkable)
It is a bouncing Mechanic by ap0calypse
http://www.hiveworkshop.com/forums/members/ap0calypse/
There is a ball bouncing around and it ricochets off of walls, buildings, etc. But it ALSO bounces off of items. I tried changing it to IsWalkable, IsLocationCliff. The ball still bounces off Items. I have no idea what I'm doing. I'm self taught in GUI and I don't know jack about JASS.
It need the ball to go over everything that is walkable. Will give credit and +Rep
http://www.hiveworkshop.com/forums/world-editor-help-zone-98/ball-bouncing-off-wall-230009/
It is a bouncing Mechanic by ap0calypse
http://www.hiveworkshop.com/forums/members/ap0calypse/
There is a ball bouncing around and it ricochets off of walls, buildings, etc. But it ALSO bounces off of items. I tried changing it to IsWalkable, IsLocationCliff. The ball still bounces off Items. I have no idea what I'm doing. I'm self taught in GUI and I don't know jack about JASS.
It need the ball to go over everything that is walkable. Will give credit and +Rep
http://www.hiveworkshop.com/forums/world-editor-help-zone-98/ball-bouncing-off-wall-230009/
JASS:
//TESH.scrollpos=0
//TESH.alwaysfold=0
function IsPathable takes real x, real y returns boolean
call SetItemPosition(udg_Item, x, y)
if GetItemX(udg_Item) == x and GetItemY(udg_Item) == y then
return true
endif
return false
endfunction
-
Setup
-
Events
- Map initialization
- Conditions
-
Actions
- Set Unit = Footman 0033 <gen>
- Set Speed = 25.00
- Set Angle = (Random angle)
- Set Item = Dummy Item 0057 <gen>
-
Events
-
Move
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
- Set Loc1 = (Position of Unit)
- Set Loc2 = (Loc1 offset by Speed towards Angle degrees)
- Custom script: set udg_Boolean = IsPathable(GetLocationX(udg_Loc2), GetLocationY(udg_Loc2))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Boolean Equal to False
-
Then - Actions
- Set Angle = (360.00 - Angle)
- Custom script: call RemoveLocation(udg_Loc2)
- Set Loc2 = (Loc1 offset by Speed towards Angle degrees)
- Special Effect - Create a special effect at Loc2 using Abilities\Spells\Items\SpellShieldAmulet\SpellShieldCaster.mdl
- Special Effect - Destroy (Last created special effect)
- Custom script: set udg_Boolean = IsPathable(GetLocationX(udg_Loc2), GetLocationY(udg_Loc2))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Boolean Equal to False
-
Then - Actions
- Set Angle = ((Angle + 180.00) mod 360.00)
- Custom script: call RemoveLocation(udg_Loc2)
- Set Loc2 = (Loc1 offset by Speed towards Angle degrees)
- Custom script: set udg_Boolean = IsPathable(GetLocationX(udg_Loc2), GetLocationY(udg_Loc2))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Boolean Equal to False
-
Then - Actions
- Set Angle = (360.00 - Angle)
- Custom script: call RemoveLocation(udg_Loc2)
- Set Loc2 = (Loc1 offset by Speed towards Angle degrees)
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
- Unit - Move Unit instantly to Loc2
- Custom script: call RemoveLocation(udg_Loc1)
-
Events
Last edited: