Moving a NPC - 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: Moving a NPC (
/showthread.php?tid=364411)
Moving a NPC -
Blunt P - 30.07.2012
How could i script, that a NPC is moving to me, when i got a specific distance?
So far the only thing i could figure out so far, is to use "SetPlayerPos" but that looks so akward. Is there other suggestions how to create something like that?
Re: Moving a NPC -
SEnergy - 30.07.2012
Quote:
Originally Posted by Blunt P
How could i script, that a NPC is moving to me, when i got a specific distance?
So far the only thing i could figure out so far, is to use "SetPlayerPos" but that looks so akward. Is there other suggestions how to create something like that?
|
there are some NPCs in gl mode, they are using some script to move when you load them, but I have no idea how to do that script or even how to modify it
AW: Re: Moving a NPC -
Blunt P - 30.07.2012
Quote:
Originally Posted by SEnergy
there are some NPCs in gl mode, they are using some script to move when you load them, but I have no idea how to do that script or even how to modify it
|
Those are recoirdings which has been made, which means, that they wont change their route. You record your movements, when you play those, then your not able to change them.
Im looking for a way to make their movement dynamic.
Re: Moving a NPC -
SEnergy - 30.07.2012
well, then record movements all around the SA map and do a random() to get random path ... also how to record that moving so I can do my own NPC? is there any tutorial on that?
AW: Re: Moving a NPC -
Blunt P - 30.07.2012
Quote:
Originally Posted by SEnergy
well, then record movements all around the SA map and do a random() to get random path ... also how to record that moving so I can do my own NPC? is there any tutorial on that?
|
i dont want something random, i want a NPC which runs to you. Like a NPC which is following you D: like a stalker *.*
Re: AW: Re: Moving a NPC -
milanosie - 30.07.2012
Quote:
Originally Posted by Blunt P
i dont want something random, i want a NPC which runs to you. Like a NPC which is following you D: like a stalker *.*
|
Not possible unless you use SetMyPos on a very fast timer.
The NPC's in Samp are following a premade path and dont have A.I
Re: AW: Re: Moving a NPC -
SEnergy - 30.07.2012
Quote:
Originally Posted by Blunt P
i dont want something random, i want a NPC which runs to you. Like a NPC which is following you D: like a stalker *.*
|
well give me some example on how to map that movement and I'll try to figure something out
Re: Moving a NPC -
Arca - 30.07.2012
However you can use this plugin to create dynamic npc easily using path nodes.
Source:
https://sampforum.blast.hk/showthread.php?tid=355849
You can also view this example on how to use that plugin.
Source:
https://sampforum.blast.hk/showthread.php?tid=358655
AW: Re: Moving a NPC -
Blunt P - 30.07.2012
Quote:
Originally Posted by Arca
|
Thanks alot! This is what i have been looking for