playMaker

Author Topic: Multiple Conditions to Events and Back  (Read 2099 times)

raiden

  • Playmaker Newbie
  • *
  • Posts: 5
Multiple Conditions to Events and Back
« on: June 04, 2016, 08:37:32 PM »
This should be fairly simple to solve, but I can't seem to wrap my head around it.

k, so I have 1 objective and that is to test with multiple conditions if a joystick axis is pointing up, leftUp or rightUp. If it is pointing up, I want to rotate the transform in the (0,0,0) direction, if its in the leftUp, (0, -55,0) and rightUp (0, 55, 0).

Ok, thats the easy part, but the part I need help with is I have 1 state that checks all conditions and then goes to the event if it meets the criteria above, what I can't get to happen is when an objective is met, the event falls out of the condition test state and in to the rotate state, but does not Finish and go back to the Condition state, so I'm just stuck in the rotate state.

What is the proper procedure to get from one state back to another, then what that action is done, Finish and go back to the Condition state so I can test if the joystick is pointing a different way.

I am have tried Finish, as well as NextFrameEvent with Finish as the event, but nothing seems to work.

Here is my setup:



Thanks for any help.

SPACE GAMER

  • Playmaker Newbie
  • *
  • Posts: 35
    • Portfolio
Re: Multiple Conditions to Events and Back
« Reply #1 on: June 04, 2016, 09:44:07 PM »
use axis event to send and exit states the options are there use no direction to end rotation state.

Zeldag

  • Full Member
  • ***
  • Posts: 198
Re: Multiple Conditions to Events and Back
« Reply #2 on: June 05, 2016, 07:53:04 AM »
Hi,

If what space gamer said doesnt help, then a screenshot of the actions contained in the rotate state would help investigate further.

(also if it is just a rotate action in there, check if you have 'every frame' ticked and untick it if so. It may be preventing the finished event from firing.)

Good luck with it!
« Last Edit: June 05, 2016, 07:56:53 AM by Zeldag »

SPACE GAMER

  • Playmaker Newbie
  • *
  • Posts: 35
    • Portfolio
Re: Multiple Conditions to Events and Back
« Reply #3 on: June 07, 2016, 10:07:37 PM »
I see what's wrong from here you appear to be setup wrong depending on what's in those state machines. this is actually a really easy function your trying to do. starch all of that. your start state should be idle. from idle State then u look Left ,right up, and down. here is a good tutorial I used to learn how to work state machines. ignore the stuff about animation but pay attention to how he uses actions to go back and forth between states, Hope this helps.