Duplicate Actors bug
#1

When trying to recreate the actors when they die the actor is getting duplicated.

[ame]www.youtube.com/watch?v=nQgEAoWOadE[/ame]

If you can see the Actor will be recreated but will also be duplicated.

pawn Код:
for(new i = 0, j = GetActorPoolSize(); i <= j; i++)
    {
        //if(!IsActorInvulnerable(i)) //Check if actor is vulnerable
        //{
        if(IsValidActor(ActorID[i]))
        {
            if(ActorCreated[i]==1)
            {
                new Float:health;
                GetActorHealth(ActorID[i], health); //Get current health
                if(health <= 0.0)
                {
                    new Float:x,Float:y,Float:z;
                    GetActorPos(ActorID[i],x,y,z);
                    DestroyActor(ActorID[i]);
                    ActorID[i]=CreateActor(ActorSkin[i],x,y,z,ActorAngle[i]);
                    return 1;
                }
            }
        }
        //}
    }
Reply


Messages In This Thread
Duplicate Actors bug - by Admigo - 04.05.2015, 15:57
Re: Duplicate Actors bug - by long76 - 04.05.2015, 16:52
Re: Duplicate Actors bug - by Pizzy - 06.05.2015, 00:24

Forum Jump:


Users browsing this thread: 1 Guest(s)