Hi,
I am not sure if moving from one fsm to the other si done within the same frame or not, I would think so tho. I'll let Alex comment on this.
you have several different ways to adress this problem.
One way would be ( in one single state)
1: check if x is equal to your x trigger value, and store the result in a bool ( x_flag)
2: check if y is equal to your y trigger value, and store the result in a bool (y_flag)
3: check that x_flag and y_flag are both true ( using "bool all true" action)
That way you do all your check in one state and you can rest assure x and y are checked at the same time.
A second way ( this is fun
)
instead of triggering a success event, turn it up side down and exit when it doesn't match.
1: if x is not equal to your x trigger value, transit to a "FAIL" event
-- if the next action is processed, that means x is equal to the x trigger value
2: if y is not equal to your y trigger value, transit to the same "FAIL" event
-- if the next action is processed, that means x is equal to the x trigger value
3: have the "finish" transition do its job ( which means x and y are on the spot)
A Third way ( I promess, the last one!) would be to write a vector equal custom action, that triggers events when equal or when not equal ( basically, comparing x, y and z values ). This would be good way if your check happens in many places during your game loop, or don't want to create too much variables and checks for this task. If you want this and can't code it, simply shout, and I'll make that custom action for you.
Bye,
Jean