NPC Following players?
#3

Quote:
Originally Posted by Adam_Hardy
Посмотреть сообщение
I would just like to know why NPC following is really a big deal if it's already in the game, like can't it just be made with a single function by SAMP
Because everything is controlled by the server, and the server is not running the client logic. It doesn't use client computed data like other games (eg GTA O) which syncs the Ped AIs between clients. The SAMP Server has no knowledge about the world nor the AI and it does not trust the client with such tasks for good reasons.

That's why it is not as easy as just calling a single function and we have synced Peds...

Anyway, this requires FCNPC or RNPC for actual NPC control (SAMP's NPCs are useless in this regard), a plugin that holds info about the world (MapAndreas, or better yet ColAndreas) and, if you want to have NPCs that aren't "brute-forcing" their way to the player, also a Path Finder.

You'll need to control the NPCs movements manually (which is the easy part), check for walkable surfaces by RayCasting and find a path. The path finding is the hardest part.


Look into FCNPC/RNPC and MapAndreas/ColAndreas. That's your best bet for making an NPC that is capable of following Players similar to SP.
Reply


Messages In This Thread
NPC Following players? - by Adam_Hardy - 19.02.2018, 23:08
Re: NPC Following players? - by UFF - 20.02.2018, 00:39
Re: NPC Following players? - by NaS - 20.02.2018, 13:04
Re: NPC Following players? - by Adam_Hardy - 20.02.2018, 22:44
Re: NPC Following players? - by Pottus - 20.02.2018, 23:30
Re: NPC Following players? - by Adam_Hardy - 21.02.2018, 00:57

Forum Jump:


Users browsing this thread: 1 Guest(s)