Can you teleport (SetPlayerPos) an 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Can you teleport (SetPlayerPos) an NPC? (
/showthread.php?tid=155567)
Can you teleport (SetPlayerPos) an NPC? -
VictorMartinez - 19.06.2010
So let's say I record an npc walking in a fairly large circle somewhere in los santos. I know you can set it's position somewhere else but... if you do will it continue to walk in that circle where you put it at? Or will it teleport back to where you recorded it to and continue to loop.
Reason I want to know is b/c I want to make a /airsupport command where an NPC in a big plane flies around you, regardless of your location. On that notice... what happens if it hits a building looool?
Re: Can you teleport (SetPlayerPos) an NPC? -
ledzep - 19.06.2010
SetPlayerPos (and all other player functions) wont affect NPC's, use
https://sampwiki.blast.hk/wiki/NPC:SetMyPos instead.
See:
https://sampwiki.blast.hk/wiki/Category:NPC for more NPC functions
I've never used the NPC myself, but it shouldn't be too much to test it yourself and see what happens.
Re: Can you teleport (SetPlayerPos) an NPC? -
VictorMartinez - 19.06.2010
I could test it myself... or I could see if anyone who has ever tried it has done it before
Re: Can you teleport (SetPlayerPos) an NPC? -
ledzep - 19.06.2010
You'll be lucky if anyone answers. Laziness won't motivate anyone to help you :P
Re: Can you teleport (SetPlayerPos) an NPC? -
boelie - 19.06.2010
Your lucky!
I figured out that a
non recorded npc can easy be teleported with setplayerpos.
i tested this the following way;
making an npc without the recording
then under onplayerspawn (the part where the npc is spawned) put SetPlayerPos)
The npc will spawn at the point you want it.
After you have done that you can still use setplayerpos...put it in a command the npc could use or something.
Note: This will not work with npc's in a vehicle
Re: Can you teleport (SetPlayerPos) an NPC? -
ledzep - 19.06.2010
Not lucky
He asked if an NPC that plays back a recording will continue to act relative to a location it is moved to, or 'teleport' back to the exact spot where that actions were recorded and carry on its jolly way.
Almost :P
Re: Can you teleport (SetPlayerPos) an NPC? -
boelie - 19.06.2010
Ow i see my bad XD well to bad for him then
Re: Can you teleport (SetPlayerPos) an NPC? -
VictorMartinez - 21.06.2010
My life sucks..
Re: Can you teleport (SetPlayerPos) an NPC? -
boelie - 21.06.2010
Quote:
Originally Posted by VictorMartinez
My life sucks..
|
LMAO
no man XD npc's suck in some ways but theres alot more fun that you can do with them.