SA-MP Forums Archive
Actors position not being updated! - 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 position not being updated! (/showthread.php?tid=572432)



Actors position not being updated! - Gammix - 28.04.2015

Finally, after wasting couple of hours and testing. Now i am able to see whats wrong.

The Actors positions are not being updated. It only works when we manually set it!

When i printed actor's position just when they spawn:
pawn Код:
Actor spawned: 1817.721435, -1089.740844, 24.078125
After applying animation:
pawn Код:
ApplyActorAnimation(pedid, "PED", "WALK_civi", 4.1, 1, 1, 1, 1, 0);
Their position is still :
pawn Код:
Actor's pos: 1817.721435, -1089.740844, 24.078125
Seems like their position is not being updating after they change/move or are using an animation.

Making a fix would really help me to use these actor in the form of zombies and do several other stuff!


Re: Actors position not being updated! - MP2 - 28.04.2015

I don't think actors are designed to be moved. They are designed to just stand there and do stationary animations. This is what NPCs are for. Actors are not a replacement for NPCs.


Re: Actors position not being updated! - Gammix - 28.04.2015

I don't agree completely. To some sort i can say ApplyActorAnimation is one of the biggest reason to make them move or do other stuff just then making them stay.

NPCs consume player slots and also don't have collisions. So there is no point in using them when we have actors now, which comes with collisions and don't even consume player slots.

Where in case you are worried about the AI of actors, its scriptable in PAWN.


Re: Actors position not being updated! - MP2 - 28.04.2015

Actors don't take up player slots because they don't need processing separately and syncing. If an actor is moving, it's going to have to be synced with every client - using bandwidth. That's where NPCs are different. Each NPC has its own process (samp_npc.exe) to process its movement and sync it with players. Actors are designed to be static and just stand there.


Re: Actors position not being updated! - Q_Lite - 28.04.2015

Kalcor have added Actor anim syning in samp 0.3.7 RC6-3. So this means we can make actors move.


Re: Actors position not being updated! - Excel™ - 28.04.2015

Bug confirmed, and we really need a fix for that!


Re: Actors position not being updated! - PeppeAC - 28.04.2015

This can't be fixed, because the server doesn't handle animations and collisions data.


Re: Actors position not being updated! - stabker - 28.04.2015

Actors move only on the client side. For a server that does not matter.

Sorry for my bad English.


Re: Actors position not being updated! - J4Rr3x - 28.04.2015

Did you tried to make a timer for get actor's position after the animation is ended?


Re: Actors position not being updated! - Gammix - 28.04.2015

Quote:
Originally Posted by J4Rr3x
Посмотреть сообщение
Did you tried to make a timer for get actor's position after the animation is ended?
No need for a timer but my script have it so yes, but always returned the same position.

Its like not coded properly or left for future updates. The function gives only those coords which are been set manually using SetActorPos or CreateActor.