Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: jess84 on July 11, 2013, 06:55:49 AM

Title: Best way to set Player 1/Player 2 character object
Post by: jess84 on July 11, 2013, 06:55:49 AM
Hi,

I'm working on a simple 2D platform test project, and I'm unsure about how to set the correct character model based on what was selected on the main menu.

I'm using a bool to state whether they're P1 or P2, and I've set the HUD and other things accordingly, but I'm unsure how to use FSMs to give each player the correct player gameobject model.

Any ideas?
Title: Re: Best way to set Player 1/Player 2 character object
Post by: jeanfabre on July 11, 2013, 07:09:01 AM
Hi,
 
 It depends very much on how your player is builded. if it's only a matter of switchin mesh, then you can access it directly using "set property" action, or simply drag the mesh component directly onto the playmaker state action editor tab. then you'll be able to switch mesh.

else, I would recommand you simply have prefabs, and load/parent the one you need to your player. Your player being an abstract entity that simply waits for it's "body".

 Does that help?

bye,

 Jean
Title: Re: Best way to set Player 1/Player 2 character object
Post by: jess84 on July 11, 2013, 07:26:20 AM
I think so, thanks. I'll give it a go this afternoon!