playMaker

Author Topic: Sending variable info for another fsm to set?  (Read 2511 times)

derkoi

  • Full Member
  • ***
  • Posts: 187
Sending variable info for another fsm to set?
« on: June 15, 2013, 02:42:10 PM »
I'd like a button to tell a confirmation window what variable it needs to set like this:

Button 1 clicked > variable to set - Global/Variable1Int > Pop up Confirm window

Confirm Window Yes button clicked > Global/Variable1Int = 1

=========

Button 2 clicked > variable to set - Global/Variable2Int > Pop up Confirm window

Confirm Window Yes button clicked > Global/Variable2Int = 1

Hope that makes sense, can anyone help please?  ???


derkoi

  • Full Member
  • ***
  • Posts: 187
Re: Sending variable info for another fsm to set?
« Reply #1 on: June 16, 2013, 05:18:37 AM »
Anyone?

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
Re: Sending variable info for another fsm to set?
« Reply #2 on: June 16, 2013, 05:30:20 AM »
Use the 'Set FSM int' action ?!

derkoi

  • Full Member
  • ***
  • Posts: 187
Re: Sending variable info for another fsm to set?
« Reply #3 on: June 16, 2013, 05:48:35 AM »
Use the 'Set FSM int' action ?!

Yes but I want to pick the variable the FSM sets using a different FSM

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
Re: Sending variable info for another fsm to set?
« Reply #4 on: June 16, 2013, 07:11:37 AM »
The variable name (the variable you set) is a string, so you could build a string depending on which variable you want to set

Variable1Int OR Variable2Int

... does that help?!