Actors bug -
zamaleksc - 16.01.2016
When i create actors they are created like in the picture,but when i i use the command which re create them it works fine
Re: Actors bug -
Eth - 16.01.2016
Can I please see the code where you create the actors? I can't know what's wrong without seeing the code..
Re: Actors bug -
zamaleksc - 16.01.2016
pawn Код:
SetPlayerVirtualWorld(playerid,3);
Robber1 = CreateActor(227,1887.2599,-2364.5789,13.5391,215.3990);
Robber2 = CreateActor(61,1888.8770,-2366.2468,13.5391,50.2707);
ApplyActorAnimation(Robber1, "PED", "IDLE_CHAT", 1.800001, 1, 1, 1, 1, 13000);
ApplyActorAnimation(Robber2, "PED", "IDLE_CHAT", 1.800001, 1, 1, 1, 1, 13000);
RobberPlane = CreateVehicle(519,1881.2903,-2364.6726,14.4760,231.6925,1,1,1000);
HeistCar = CreateVehicle(411,2488.4846,-1682.3033,13.0745,87.3089,0,0,1000);
HeistCP = SetPlayerRaceCheckpoint(playerid, 2,1961.3497,-2175.5864,13.5223, 0.0,0.0,0.0, 5.0);
SetVehicleVirtualWorld(RobberPlane,3);
SetVehicleVirtualWorld(HeistCar,3);
SetActorVirtualWorld(Robber1, 3);
SetActorVirtualWorld(Robber2, 3);
SetActorInvulnerable(Robber1, false);
SetActorInvulnerable(Robber2, false);
SetActorHealth(Robber1,50);
SetActorHealth(Robber2,50);
gokill[playerid] =1;
Re: Actors bug -
Eth - 16.01.2016
Which actors are having those problems? Robber2 and robber1?
Re: Actors bug -
zamaleksc - 16.01.2016
as you see in the picture both are spawned flying and upon each others.
Re: Actors bug -
Eth - 16.01.2016
Okay I don't know where the problem is , but I can tell you some possibilities
1.The two actors are close to each other so increase the distance between them
2. there is a problem in the animation of the actors so try to change this:
pawn Код:
ApplyActorAnimation(Robber1, "PED", "IDLE_CHAT", 1.800001, 1, 1, 1, 1, 13000);
ApplyActorAnimation(Robber2, "PED", "IDLE_CHAT", 1.800001, 1, 1, 1, 1, 13000);
to this:
pawn Код:
ApplyActorAnimation(Robber1, "PED", "IDLE_CHAT", 1.800001, 1, 0, 0, 1, 13000);
ApplyActorAnimation(Robber2, "PED", "IDLE_CHAT", 1.800001, 1, 0, 0, 1, 13000);
Re: Actors bug -
zamaleksc - 16.01.2016
As i said that when i make the command again,they get in their right positions.
Re: Actors bug -
Eth - 16.01.2016
Then try to change the applyanimation variable as I told you above and see if it works out without making the command again
Re: Actors bug -
zamaleksc - 16.01.2016
same problem
Re: Actors bug -
-CaRRoT - 16.01.2016
Quote:
Originally Posted by Eth
Then try to change the applyanimation variable as I told you above and see if it works out without making the command again
|
No that wouldn't make a difference, it has to do with the synchronization of the actors on distance, that issue only appears when you spawn far away from the actors and you go toward their area, you'll see them like that. But if you spawn near them, they'll work fine.
I have the same issue with my actors system and I have to resync them & from there they work fine, I am still looking for a solution for the same issue.
I recommend using
http://forum.sa-mp.com/showthread.ph...ghlight=Emmet_ for the resync actor function.
Re: Actors bug -
zamaleksc - 16.01.2016
Same,how can be the problem in animation and it works when i use the command again and again,only the first time it get fucked,how ?
@carrot I'm already using Emmet's include but when shall i Resync the actors ?
Re: Actors bug -
Eth - 16.01.2016
Check the distance between the player and the actor OnPlayerUpdate, for example:
pawn Код:
public OnPlayerUpdate(playerid)
{
new Float:X,Float:Y,Float:Z;
for(new i = 0; i < MAX_ACTORS; i ++)
{
GetActorPos(i,X,Y,Z);
if(IsPlayerInRangeOfPoint(playerid,5.0,X,Y,Z))
{
ResyncActor(i);
}
}
return 1;
}
this should work.
Re: Actors bug -
zamaleksc - 16.01.2016
this kept syncing lol,but the idea helped me and i fixed it,Thanks
Re: Actors bug -
Eth - 16.01.2016
Quote:
Originally Posted by zamaleksc
this kept syncing lol,but the idea helped me and i fixed it,Thanks
|
Lol My bad didn't notice that it will keep resyncing xD glad you fixed it!