playMaker

Author Topic: Is there a way to skip an action?  (Read 1836 times)

playsteven

  • Junior Playmaker
  • **
  • Posts: 75
Is there a way to skip an action?
« on: March 18, 2016, 05:25:33 AM »
Hey,

Is there any way you can skip an action? For instance:

1 Action
2 Skip to action 4 if such and such
3 Action to be skipped
4 We're here

Thanks,
Steven

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: Is there a way to skip an action?
« Reply #1 on: March 18, 2016, 12:03:26 PM »
No. You need to use different states to do this.

For example:


You can use Logic Actions to branch:
https://hutonggames.fogbugz.com/default.asp?W456


djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Is there a way to skip an action?
« Reply #2 on: March 18, 2016, 01:39:02 PM »
Hi,
If you don't need to do something "every frame" inside that state you can also use action sequence : right click on the right side and select it, you will see the lines changed like on the the picture, if the bool is set to true it will go straight to the next state and skip the actions below. if you put an action above the bool test it will di that action 1st and then the bool check.


playsteven

  • Junior Playmaker
  • **
  • Posts: 75
Re: Is there a way to skip an action?
« Reply #3 on: March 18, 2016, 02:39:10 PM »
Cheers, guys, I just rewrote the action and put a bool at the start, which if false skips the rest of the code :D

Thanks for the input.