playMaker

Author Topic: Editing FSMState aspects on a FSM via API/realtime  (Read 1545 times)

Kein

  • Playmaker Newbie
  • *
  • Posts: 17
Editing FSMState aspects on a FSM via API/realtime
« on: August 15, 2017, 02:45:34 AM »
Let's say I have FSM named "myFSM" and it has state "New Scene", I want to edit some aspects of that FsmState, namely it changes the position of some gameObject in the scene right at scene load and I want to modify it beforehand.

Is it doable via API?
« Last Edit: August 15, 2017, 03:15:02 AM by Kein »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Editing FSMState aspects on a FSM via API/realtime
« Reply #1 on: August 15, 2017, 03:49:21 AM »
Hi,
What do you mean by beforehand?

Edit from another scene?
From scenes you could use save/load
(playerprefs or 3th party assets like easy save)
Or use globals

Or do you mean by script?

Kein

  • Playmaker Newbie
  • *
  • Posts: 17
Re: Editing FSMState aspects on a FSM via API/realtime
« Reply #2 on: August 15, 2017, 03:57:53 AM »
I mean by script.
Right now a state named "New Scene" does an bunch of actions, one of which is "HutongGames.PlayMaker.Actions.SetPosition". I want to change X and Y values of these function realtime via monobehaviour script.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Editing FSMState aspects on a FSM via API/realtime
« Reply #3 on: August 15, 2017, 04:31:28 AM »
Hi,
i don't think that you can change the value directly
But you can change a variable on an fsm.

Here you can find some api references :
https://hutonggames.fogbugz.com/default.asp?W127

Kein

  • Playmaker Newbie
  • *
  • Posts: 17
Re: Editing FSMState aspects on a FSM via API/realtime
« Reply #4 on: August 15, 2017, 01:11:47 PM »
Thanks but these values aren't "variabled". Oh well.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Editing FSMState aspects on a FSM via API/realtime
« Reply #5 on: August 17, 2017, 12:21:05 AM »
Hi,
Maybe you can make them variables?
You can preset a value.
It Should work the same as putting the value directly into the action