Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: DIamod on April 26, 2019, 09:30:55 AM

Title: Logic behind book pages
Post by: DIamod on April 26, 2019, 09:30:55 AM
Hi, in one of my scenes I have a book that has 4 pages, each displaying 1 page at a time. I am struggling with the logic behind this, currently, I have two buttons

Forwards
Backwards

the book is initialised with an int value of 0
pressing forwards button will increase the value by 1
pressing backwards will decrease the value by 1

I have another FSM that has an "int switch" like so
https://i.imgur.com/9zRCoq7.png

It correctly starts on page1 which is int0, but I do not understand how to transition back to state 1 ready ready for page2 when the button is pressed.

I tried adding a finish but that throws an error
https://i.imgur.com/ZBeMYFM.png

Any help would be apreciated