playMaker

Author Topic: Enable Component  (Read 3043 times)

cronkie

  • Playmaker Newbie
  • *
  • Posts: 13
Enable Component
« on: September 09, 2012, 06:43:44 PM »
I think I need a combo of "Enable Behavior" and "Has Component"...

"Enable Behavior" seems to work well for per GameObject Behavior enabling/disabling, but I can't gain access to my lower-level building block script files.  "Has Component" gives me access to those files, but I can't enable/disable them (that I'm aware of).

Here's my scenario.  I have three script files:
LookStateText.js
SpeakStateText.js
UseStateText.js

I attach each of those script files on specific GameObjects throughout my scene.  I have a unique InputManager with separate mouse cursors for "Look", "Speak", and "Use".  If you click on an object with the "Look" cursor, then it gives different text than "Speak" or "Use".  I can achieve this on a per GameObject basis just fine, but I can't seem to figure out how to make it a generalized system.  I basically need a method of the system understanding if any object has those three script files attached to them and be able to enable/disable on a high level without having to get micro with every single object.

This seems like something that I'm just brain-farting on, but wanted to see if there was a simple generalized Action that could be created (or already exists that I'm just not seeing) that is used just like my current "Enable Behavior" workflow.

Any help would be greatly appreciated.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Enable Component
« Reply #1 on: September 10, 2012, 03:28:13 AM »
Hi,

 I think your way out of this is to create a FSM on each of these object that is responsible for this management. There is no features in playmaker that allow you to do what you want as is, you'll have to come up with a FSM that handles all your check in series and act upon the various states and component found.

bye,

 Jean