Actor destroying at wrong player
#1

So along with all my variables I got this up top;

Code:
new TutorialActor[MAX_PLAYERS][3],
Now, for the tutorial I got this which creates the actor inside a binco with a special virtual world (player's virtual world is set to this as well)

Code:
//onplayerspawn i
	if(!pData[playerid][pTutorialFinished]) // and some more code
		TutorialActor[playerid][0] = CreateActor(211, 208.8536,-98.6901,1005.2578,179.5417); // here the actor is made
		SetActorVirtualWorld(TutorialActor[playerid][0], 6969+playerid);
Once the player exits the binco from the tutorial, the actor gets destroyed(no need for an actor anymore because he isnt being seen)
Code:
DestroyActor(TutorialActor[playerid][0]);
And under OnPlayerConnect I have this
Code:
DestroyActor(TutorialActor[playerid][0]);
Along with a whole bunch of variables that are reset.

The weird thing, those are the only 2 times an actor gets destroyed (onplayerconnect and when the actor isnt visible anymore)

Yet, (tested with 3 people at same time)

Here's how it went

1st player(me) joins, gets halfway in tutorial with no bugs/mistakes/errors whatsoever.

2 minutes after: 2nd player(friend of mine) connects to have a peek at the tutorial I made, but once he connects somehow my actor is being destroyed?

1 minute after 2nd player join: 3rd player joins and actor for 2nd player disappears.

Is there anything I did wrong?
Reply


Messages In This Thread
Actor destroying at wrong player - by JaydenJason - 14.08.2015, 19:13
Re: Actor destroying at wrong player - by Jefff - 14.08.2015, 22:18
Re: Actor destroying at wrong player - by JaydenJason - 15.08.2015, 12:28

Forum Jump:


Users browsing this thread: 1 Guest(s)