playMaker

Author Topic: Switch String Failed - Nothing Happen [SOLVED]  (Read 1627 times)

rainexplorer

  • Junior Playmaker
  • **
  • Posts: 65
Switch String Failed - Nothing Happen [SOLVED]
« 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:


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 :



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) :


inside "get Button Name" (first scene, store variable at global) :


Error at end of first scene 's FSM :




Any Idea ?
« Last Edit: November 18, 2017, 10:08:26 AM by djaydino »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Switch String Failed - Nothing Happen
« Reply #1 on: November 17, 2017, 05:08:26 PM »
Hi,
Try setting some breakpoints and enable Debug :



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 :


rainexplorer

  • Junior Playmaker
  • **
  • Posts: 65
Re: Switch String Failed - Nothing Happen
« Reply #2 on: November 18, 2017, 06:07:36 AM »
Hi, Thanks as this has been solved...

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Switch String Failed - Nothing Happen
« Reply #3 on: November 18, 2017, 10:08:12 AM »
Hi,
Great! What was the issue?