SA-MP Forums Archive
SAMP NPC Traffic and Peds - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SAMP NPC Traffic and Peds (/showthread.php?tid=426558)



SAMP NPC Traffic and Peds - jakejohnsonusa - 29.03.2013

Is it possible to do somthing like this scripter has done in MTA using SAMP, has it ever been done before in SAMP?
With NPC or AI peds and traffic, with normal (vehicle and NPC) health...

Like in this video done with MTA:
http://www.*******.com/embed/zR2zp9ldedA

If it is possible (Which I believe it is) does anyone know how to go about creating this with SAMP?


Thanks to anyone who can give information on this!


Re: SAMP NPC Traffic and Peds - dominik523 - 29.03.2013

idk is it possible to create so much NPCs, but I've seen tutorial about recording NPC paths. Here it is:
[ame]http://www.youtube.com/watch?v=EeS-FbfAhi8&list=PL5A56A274E3E5E6A4&index=10[/ame]


Re: SAMP NPC Traffic and Peds - jakejohnsonusa - 29.03.2013

Hmmm yes and thanks, But I'm thinking along the lines of using the RecordFree NPC's and maybe Map Andreas. Just not sure how to do it.

Anyone else have some info on this?


Re: SAMP NPC Traffic and Peds - Ryan_Bowe - 29.03.2013

I haven't seen this done in SA-MP before, not even sure it's possible.


Re: SAMP NPC Traffic and Peds - jakejohnsonusa - 30.03.2013

Anyone else know, DEV's?


Re: SAMP NPC Traffic and Peds - mastermax7777 - 30.03.2013

no its not possible. u can make them walk in a line or 1 path but its all they can do .. anything u want to do with NPC's u can basically forget it.. not mention AI lol


Re: SAMP NPC Traffic and Peds - Babul - 30.03.2013

that video demonstrates how to sort of stream NPCs. not bat, considering the boring 12-minute ride along the paths...
i was missing the blips on the radar, but thats not the point.
each npc was busy driving its boring route at the same speed, regardless modelid - to be honest, this looks far worse than the singleplayer peds, which actually REact on actions around.
for SAMP, i think about the GPS, HeightMap, and RNPC plugin combined to generate realtime peds, driving along some nodes.
and there is the crux, its close to impossible to:
-recalculate the next step/route for 100 bots, to...
-make the bots able to act in realtime, like:
-let them dodge traffic,
-let them get damaged by explosions/bullets,
-let them shoot at enemies.
-let them avoid custom objects

considering that lots of NPCs take an analogue amount of threads, it IS possible to let them act almost like in singleplayer. if each bots' logic is operating really, really fast, then its not possible.
due to the currently used pathfinding algorithms (a*, dj etc) there is no way to achieve more than 50 npcs. but, somehow i got 100 npcs running lagfree, reacting on players actions incl. (custom scripted) explosions, bullets, and traffic (they dodge cars when a player drives towards them) - so, in short:

YES, its possible, but you need a ****load of time to learn the techniques on how to do it.

@mastermax7777: you just made me start to think about scripting NPCs which enter a casino to arrest players - considering AI: imagine if a player enters an interior with 2 entrances. would it be possible to let the NPCs hunt you down by entering both (or more!) entrances?