SA-MP Forums Archive
Actors falling through ground/floor - 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: Actors falling through ground/floor (/showthread.php?tid=590775)



Actors falling through ground/floor - MP2 - 03.10.2015

I have actors at some places (not in interiors), and they often are not where they are supposed to be. They move by a few meters. I have figured out that it's because they're spawning before the ground is streamed in (SA objects - not server ones) and falling down, then re-appearing on the surface.

Is there any way to prevent this from happening, apart from constantly re-setting their position or creating a platform under them?


Re: Actors falling through ground/floor - Abagail - 03.10.2015

Set them at a stable location near-by and then after a few seconds when the objects have loaded teleport them there, though I am not sure if that's how they sync(I doubt it).

By the way, is the GetActorPos function returning the new coordinates or the one you have set?


Re: Actors falling through ground/floor - davve95 - 03.10.2015

I don't know if this works, but maybe you can spawn them with a timer?
So they spawn on the ground/floor when it have loaded.