playMaker

Author Topic: How to call PlayMaker Actions from script?  (Read 2756 times)

amaranth

  • Full Member
  • ***
  • Posts: 172
How to call PlayMaker Actions from script?
« on: April 10, 2013, 02:40:18 PM »
Is there a way to call a PlayMaker Action from a script? If yes, can someone post a code snippet?

I'm specifically trying to figure out how to obtain multiple return values from one action. For example, Raycast From Screen, which can return a Bool and a GameObject.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to call PlayMaker Actions from script?
« Reply #1 on: April 11, 2013, 02:05:44 AM »
Hi,

 Unfortunatly no instead, you will create a Fsm with a global transition on a state, and call that event from the script. then the state will perform its actions, and when done can transit to another state that can send a message to your script and your script can then access the fsm variables values it needs.


the real answer tho... is yes :) cause within a custom action ( not your regular actions), you can register for delegates, so if your script implements delegates, your script registers to it, and will be triggered, then it can perform what ever you want and feed back the result to your script from other script goodies ( cause at this point, you could have passed a pointer to your script so your action can talk to it directly). But that's already very advanced.

 bye,

Jean