SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 26/02/2020, 10:54 PM   #1
jasperschellekens
Gangsta
 
jasperschellekens's Avatar
 
Join Date: Dec 2016
Location: Gehenna
Posts: 815
Reputation: 79
Default RNPC/ColAndreas - How to calculate paths around obstacles

I am currently using RNPC and the NPC's can currently walk/glitch through walls/objects. I'm trying to prevent this using ColAndreas.
I have found out that I can detect it with this:
PHP Code:
if(CA_IsPlayerBlocked(npcid)==1// blocked by object 
What I'm stuck at is, how do I calculate the path around the object? Or is there a way to turn the NPC 180 degrees to make it go the other way?
__________________
Coming soon (5-21-2020):

Undead Wasteland Roleplay - The year is 1996. San Andreas is a wasteland ruled by the undead. the once so glorius landscape of San Andreas, is now a shattered decayed place that is only a vague memory of the world as we used to know it.
Official Live Beta Release Date: 21th of May, 2020
Discord
jasperschellekens is offline   Reply With Quote
Old 27/02/2020, 07:46 PM   #2
jasperschellekens
Gangsta
 
jasperschellekens's Avatar
 
Join Date: Dec 2016
Location: Gehenna
Posts: 815
Reputation: 79
Default Re: RNPC/ColAndreas - How to calculate paths around obstacles

For everyone that is having the same problem as me, this is the solution:
https://forum.sa-mp.com/showthread.php?t=427227
__________________
Coming soon (5-21-2020):

Undead Wasteland Roleplay - The year is 1996. San Andreas is a wasteland ruled by the undead. the once so glorius landscape of San Andreas, is now a shattered decayed place that is only a vague memory of the world as we used to know it.
Official Live Beta Release Date: 21th of May, 2020
Discord
jasperschellekens is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Choosing paths. Twizted Everything and Nothing 16 16/07/2013 12:32 PM
Control NPCs using Paths? Programie Scripting Help 2 16/06/2012 02:49 PM
anti-tank obstacles cruising Scripting Help 0 17/11/2011 05:27 PM
Nodes/Paths from San Andreas RyDeR` Everything and Nothing 9 28/12/2010 02:48 PM
[Map] [MAP] Stunt Zone at LV AirPort - !Obstacles,Jumps,Rings,Box! ETC The Forsaken Maps 7 10/02/2010 08:37 PM


All times are GMT. The time now is 04:05 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.