playMaker

Author Topic: CheckGameObjVariablesNotNull  (Read 2892 times)

Andy22

  • Junior Playmaker
  • **
  • Posts: 99
CheckGameObjVariablesNotNull
« on: December 02, 2013, 07:00:47 AM »
Hi,

we found it usefully to always have a "Init" start state, which works like u expect and all Init/setup logic goes into it. Most gameObj related actions execute "gracefully", means the action finishes without even noting a error if they encounter null values.
While this is fine, we found it usefully to always check our gameObj variables inside the Init() state.

So here is the action we use for this, this action will only Finish if all gameobjects of a FSM are Not Null. U can optionally specify which named variables should be excluded from the check, which is usefully for variables like dynamic targets.

bye Andy

PS: I added a version that can also check FSMObjects and can also filter those by Type. This way u can add one audioClip and exclude all of that type. Assuming that u often expose audioClip variables, that don't need to-be set.
« Last Edit: December 02, 2013, 08:22:50 AM by Andy22 »