playMaker

Author Topic: api: fsm variable useVariable: what does that do? [SOLVED]  (Read 2568 times)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
api: fsm variable useVariable: what does that do? [SOLVED]
« on: November 30, 2011, 01:00:54 AM »
Hi

 Example taken from the raycast action:

 fromPosition = new FsmVector3 { UseVariable = true };

What does "UseVariable" is for?

 Thanks,

 Jean
« Last Edit: December 04, 2011, 02:36:22 AM by alexchouls »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: api: fsm variable useVariable: what does that do?
« Reply #1 on: November 30, 2011, 04:00:02 PM »
An action parameter field can either show an edit field or a variable popup selector. You toggle between these using the Variable toggle. UseVariable is the state of that Variable toggle.

Some actions set UseVariable to true in Reset to force the action editor to show the variable popup selector, with None selected, instead of an edit field. This can help make choices more intuitive or reduce clutter, e.g., if the default choice should be None rather than the default value for that parameter type.

Does that make sense?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: api: fsm variable useVariable: what does that do?
« Reply #2 on: December 01, 2011, 01:46:58 AM »
Hi Alex,

 yes, got it, thanks!

 Bye,

 Jean