State switch: Difference between revisions

From Whirled Club Wiki
Jump to navigation Jump to search
(Created page with "Alright, here's how to make a state switch by using an action. What you're going want to do is go to your action. Make another layer, and go to the AS part of it, and enter...")
 
m (Text replacement - """ to """)
 
Line 3: Line 3:
What you're going want to do is go to your action. Make another layer, and go to the AS part of it, and enter this code:
What you're going want to do is go to your action. Make another layer, and go to the AS part of it, and enter this code:


_ctrl.setState("StateNameHere");
_ctrl.setState("StateNameHere");


Replace "StateNameHere" with the name of the state you want the action to switch to.  
Replace "StateNameHere" with the name of the state you want the action to switch to.  


And that should do it. Enjoy your state swtiches to your heart's content.
And that should do it. Enjoy your state swtiches to your heart's content.

Latest revision as of 09:15, 4 September 2018

Alright, here's how to make a state switch by using an action.

What you're going want to do is go to your action. Make another layer, and go to the AS part of it, and enter this code:

_ctrl.setState("StateNameHere");

Replace "StateNameHere" with the name of the state you want the action to switch to.

And that should do it. Enjoy your state swtiches to your heart's content.