CreateActor ID Problem (ID 255)(Solved)
Hello everyone, I'm having a problem with the CreateActor function, when I create an actor it spawns with ID 255.
This is no problem if it's only one actor, because I use it to spawn a cursor and I destroy it when not used. Each player can only have one cursor at the time.
But when there is two or more players and both of them try to use the cursor, the two cursors have the ID 255. This is a problem to identify each one.
I'm doing something wrong? How can I give them different IDs?
Here is the code I'm using:
Code:
actor.cursor = CreateActor("Phezel Cursor");
actor.cursor.Pos = actor.Pos;
actor.cursor.Team = actor.Team;
MovableMan:AddActor(actor.cursor);
actor.parentplayer = actor:GetController().Player;
ActivityMan:GetActivity():SwitchToActor(actor.cursor, actor:GetController().Player,actor.Team);
actor:SetControllerMode(Controller.CIM_DISABLED, -1);
Thanks in advance.