playMaker

Author Topic: Best way to set Player 1/Player 2 character object  (Read 1927 times)

jess84

  • Hero Member
  • *****
  • Posts: 515
Best way to set Player 1/Player 2 character object
« 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?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Best way to set Player 1/Player 2 character object
« Reply #1 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

jess84

  • Hero Member
  • *****
  • Posts: 515
Re: Best way to set Player 1/Player 2 character object
« Reply #2 on: July 11, 2013, 07:26:20 AM »
I think so, thanks. I'll give it a go this afternoon!