SphereCommunity
Line of sight - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Line of sight (/Thread-Line-of-sight)



Line of sight - Leonidas - 01-05-2017 06:15 PM

Alright so I have a cannon shooting a wall A, works fine. What I'm wanting to do is for the cannon to shoot the item blocking it's line of sight. For example:

Player A double clicks cannon, gets ready to target the wall A, another player runs in and casts wall of stone in between the cannon and the wall he is targeting. Player A continues to target wall A, the cannon then checks if there is anything in between, and if there is it hits the item that is in its path instead of wall A.

Also, how can i make it so cannons can only fire the way it is aiming?