problem with actors
#1

Hello, i have an problem with actors.
Basically, when i create them, and apply animation on them they move from the position they should spawn, sometimes like 10-20ft away, cant see what the problem is, can you please check the code:

pawn Код:
new string[128];
        format(string,sizeof(string), "SPAWNED PED");
        HitnaInfo[playerid][PedText] = CreateDynamic3DTextLabel(string, -1, MedicSpawn[Random][0], MedicSpawn[Random][1], MedicSpawn[Random][2] + 0.8, 5.0, INVALID_PLAYER_ID,INVALID_VEHICLE_ID);

        HitnaInfo[playerid][Actor] = CreateActor(rsk, MedicSpawn[Random][0], MedicSpawn[Random][1], MedicSpawn[Random][2], MedicSpawn[Random][3]);
        ApplyActorAnimation(HitnaInfo[playerid][Actor], "BEACH", "bather", 4.0, 1, 0, 0, 0, 0);
       
        c_SetPlayerCheckpoint(playerid, MedicSpawn[Random][0], MedicSpawn[Random][1], MedicSpawn[Random][2], 3.0);
        GPSOn[playerid] = 1;
Reply
#2

Nm, came up with a solution.
Store actors pos in a global variable and then run timer (i run it every 10 secs) to restore its pos with SetActorPos.
Reply
#3

I think other people have had the same problem, it's likely a desync bug. You also shouldn't need to run a timer every ten seconds, a minute timer should do the trick assuming it's not something in your script doing this.
Reply
#4

Yes, it is a bug, I'm guessing that developers are aware of this issue, but didn't see them confirm the problem.
I figured out that it has nothing to do with using animation on actor(for which I've thought was the problem from the start).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)