playMaker

Author Topic: Go to previous or next state  (Read 3819 times)

aydinu

  • Playmaker Newbie
  • *
  • Posts: 15
Go to previous or next state
« on: March 03, 2014, 04:50:19 AM »
Hi

I have a scene where instructions appear on screen and with clicking on objects in the scene I go through these steps/instructions using PlayMaker. All is working fine but I want to create 2 buttons (next and previous). Next will go to next state and previous button to previous state:).

I have searched on the forums on how to use this Go to Previous state but without luck. I don't have a lot of experience using PlayMaker but getting there:)

Any help would be appreciated

Thanks

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Go to previous or next state
« Reply #1 on: March 03, 2014, 07:34:50 AM »
GoToPreviousState goes to the last state the FSM was in, it can't be used to backtrack through multiple states.

If your button path is linear then its just a matter of telling the buttons to fire events that go to either the next or the previous state by making transitions to them. If it's not linear, then I think you would need to keep track of the path the user took and reuse that information when going forward/backward.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

aydinu

  • Playmaker Newbie
  • *
  • Posts: 15
Re: Go to previous or next state
« Reply #2 on: March 03, 2014, 09:15:57 AM »
Thanks for the tip and I will try this out. It will be just linear

Aydin

aydinu

  • Playmaker Newbie
  • *
  • Posts: 15
Re: Go to previous or next state
« Reply #3 on: March 04, 2014, 12:43:31 AM »
Ok this what I have got and don't know how to continue from here:(
How do I make the buttons fire events that go to the next or previous states with the transitions as you mentioned? IS there an action that I need that can do this?

Thanks

Aydin
« Last Edit: March 04, 2014, 05:17:35 AM by aydinu »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Go to previous or next state
« Reply #4 on: March 04, 2014, 09:21:27 AM »
Have you seen this tutorial video?

Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

aydinu

  • Playmaker Newbie
  • *
  • Posts: 15
Re: Go to previous or next state
« Reply #5 on: March 04, 2014, 09:27:53 AM »
I was going through his tutorials today:).
I watched the tutorial and it is all clear but the only thing that I can't find or how to do is the action that will take me to the previous or next state

Aydin
« Last Edit: March 04, 2014, 10:09:47 AM by aydinu »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Go to previous or next state
« Reply #6 on: March 04, 2014, 12:41:51 PM »
You simply need to send an event, and wire it up to the previous state. When you hit the button to go back, make that button fire the event that is wired up to go there.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D