Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: coxy17 on July 18, 2016, 04:54:28 AM
-
Hi
I have a issue with one object in my setup, i have only one object i cant make into a prefab which is my player. I have other prefabs referencing my player (ive setup a global game object on my player so prefabs can reference it). When i make it into a prefab i get the message from other prefabs that they are not referencing a scene object. I sort understand why but I thought the global game object would resolve this, cant think of a way i can get around this issue, i have the prefab in my scene already prior to starting the game.
I reason I need my player to be a prefab instead of just a scene object is that the player can choose which character to be from the character selection screen. I have my default character in my scene but if it detects a switch in character then i want to load it instead.
Any help would be great, at a loss on where to go from here, not sure if instantiating a prefab could help but wont this still be the same issue for the other prefabs wont be able to reference it?
i hope im making sense.
Nick
-
Hi,
You can set your character into a global and use the action "Send Event By Name"
or maybe you can make a 'Player' parent gameobject with the fsm's you need and only swap the character visuals
-
Hi
So at the moment the other prefabs use 'send event' then take the global game object to send it to (player object). So i guess i need to remove this and use 'Send Event By Name' instead? i have FSM's on the player prefab too. The setup for the player FMS will be the same for all characters except the visuals.
Yeah for the character switch i might do what you said and have a parent object.
Thanks
Nick