Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: DeerHunter on June 21, 2017, 05:14:48 AM

Title: Question about Logic[SOLVED]
Post by: DeerHunter on June 21, 2017, 05:14:48 AM
I want a logic expression which is when bool test is true and gameobject compare is the same object ,then move to next statemachine , if any of those changed then come back . Both of the condition must be reached . How can I do this with playmaker?
Title: Re: Question about Logic
Post by: ... on June 21, 2017, 05:33:27 AM
You can't do it in one state. In first state, test bool, if it's false do what you want (return to previous state to wait for the trigger or whatever you planned), if it's true, then go to the gameobject compare state. Then you can use bool changed/gameobject changed.
Title: Re: Question about Logic
Post by: djaydino on June 21, 2017, 11:25:37 AM
Hi,

another way you can do this is :

Do the gameobject compare in a 2nd fsm, if the object is the same, use 'set fsm bool' and point it to the 1st fsm.

On the 1st fsm add a bool variable and name it "Same GameObject" (for example)
Then instead of using 'test bool' use 'bool all true' and place the 2 bool variables.

Also you should get 'Bool Any False' from the Ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181)
You can use that one to go to the previous state.
Title: Re: Question about Logic
Post by: DeerHunter on June 22, 2017, 12:54:35 AM
Thank you very much!