Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: ShawnMcCool on February 11, 2012, 04:48:16 PM

Title: [SOLVED] Question about application ready-state.
Post by: ShawnMcCool on February 11, 2012, 04:48:16 PM
I have a game manager that reads in the necessary configuration for a level and tells an object to start populating the map once the map is loaded and ready.

However, even though I'm using 'FINISHED' the populator object isn't yet in the correct 'Listener' state when the game manager sends the signal.

What is a proper way to handle this?  If I put a WAIT delay on the game manager before it sends the "GO AHEAD AND POPULATE" event it works great.  But, I want to not waste time and do it as soon as it's ready.
Title: Re: Question about application ready-state.
Post by: Alex Chouls on February 12, 2012, 01:36:20 PM
Are you talking about the Finished event in Load Level?
Title: Re: Question about application ready-state.
Post by: ShawnMcCool on February 12, 2012, 03:41:18 PM
I have a few different "managers" that need to be at a ready state before the rest of the game kicks off.  What's the best way to manage that?
Title: Re: Question about application ready-state.
Post by: justifun on February 13, 2012, 03:31:57 PM
I believe what you want to do is have a seperate level (a preloader as you will).  And put all of your managers in there and let them get setup etc, and then use a "Load Level" action which takes you to the actual game as its finished event.

Correct me if i'm wrong alex, but the load level won't "finish" unless all of the assets in that level are loaded correct? so it shouldn't matter on which manager the action is added?
Title: Re: Question about application ready-state.
Post by: ShawnMcCool on February 15, 2012, 01:47:12 PM
That sounds reasonable and it has given me some perspective.  The objects will persist through the scene change, though?  If so, which objects will and which won't? 
Title: Re: Question about application ready-state.
Post by: justifun on February 15, 2012, 01:53:42 PM
I forget off the top of my head what action has this checkbox, but basically you need to flag which objects don't get destroyed on load

more info here

http://unity3d.com/support/documentation/ScriptReference/Object.DontDestroyOnLoad.html

ill keep looking for the playmaker action that has this.....
Title: Re: Question about application ready-state.
Post by: justifun on February 15, 2012, 01:54:54 PM
Here we go

https://hutonggames.fogbugz.com/default.asp?W314

Title: Re: Question about application ready-state.
Post by: ShawnMcCool on February 15, 2012, 03:09:42 PM
Thank you, I now have a far better picture of the workflow I need to implement.