Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: rainexplorer on November 17, 2017, 05:17:20 AM
-
Hi,
i got my FSM component that have switch string inside, but it seems failed, because nothing happen, the flows are [first scene] - [2nd scene]
on 2nd scene, nothing happen at Switch String
first scene, FSM flow:
(https://i.imgur.com/7YKjKjV.png)
1) there're some button (button_A, button_B & button_c).
2) i click button_A then store to global_variable
3) at end fsm, load next scene
second scene, FSM flow :
(https://i.imgur.com/0HGoGC3.png)
1) at first component i use switch string to read global variable X (nama_tombol)
2) if variable X (nama_tombol) = 'button_A', it should change sprite to "Picture_A"
3) but it failed, nothing happen...
Additional :
inside Switch String FSM (2nd scene) :
(https://i.imgur.com/6nVYti8.png)
inside "get Button Name" (first scene, store variable at global) :
(https://i.imgur.com/f24n3wX.png)
Error at end of first scene 's FSM :
(https://i.imgur.com/4Bv8ups.png)
Any Idea ?
-
Hi,
Try setting some breakpoints and enable Debug :
(https://i.imgur.com/oddk8Ru.png)
For Example set a breakpoint (right-click on a state header to toggle a breakpoint)
on the state where you go to the next scene, but after you got the name.
Then play the game and when it pauses (@ the break point) look to the get name action and see what value is set to the variable (you can only see it when Debug is enabled)
Here are some nice tips for debugging :
-
Hi, Thanks as this has been solved...
-
Hi,
Great! What was the issue?