playMaker

Author Topic: Player selection from one scene to the next  (Read 1262 times)

michaelgenn

  • Playmaker Newbie
  • *
  • Posts: 7
  • GenPhi Games
Player selection from one scene to the next
« on: February 21, 2015, 12:54:17 PM »
Hi.  I'm trying to create a character selection scene using the Mouse Pick to assign the selected object to a global variable then load the level scene.  In the level scene I have a spawner game object with a Create Object action with the game object being the global variable.  When I click on the character, it loads the level but does not create the object.  Any ideas?

I have a mouse over state that has the mouse pick action, assigning the global variable(Store Game Object).  I also have a mouse pick event that contains MouseClick (To a state that loads the level) on the Mouse Up.

Thanks

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Player selection from one scene to the next
« Reply #1 on: February 24, 2015, 03:27:10 AM »
Hi,

 is your global properly set when you load that scene? you can view the global value in the global variables inspector.

 Bye,

 Jean

michaelgenn

  • Playmaker Newbie
  • *
  • Posts: 7
  • GenPhi Games
Re: Player selection from one scene to the next
« Reply #2 on: March 01, 2015, 11:54:49 AM »
I ended up using Set Fsm Game Object to set the game object for the FSM on the other scene and it's working.

I guess this works about the same?

To answer your question... I turned on debugging and it never set the global variable, even in the scene I selected the game object in.  I am using Unity 5 though.  Could just be a bug?

Thank you for the reply