Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Aaddiction on May 04, 2020, 09:35:07 AM
-
I'd like to ask for the best approach in the following case.
From state state 1 I want to go to state 2 but only if I have a string with the name "string1" and float that is over "800". Basically && in C#.
How to do that in Playmaker in a single state and combine a string and a float?
To do this:
if(x == z && y == z){
//Do something
}
-
hi,
For string, use string compare and store the value
For float use 'float compare with bools' (Ecosytem (https://hutonggames.fogbugz.com/default.asp?W1181))
Then use 'Bool All True' to check if both are true.
There is also a action on the Ecosytem (https://hutonggames.fogbugz.com/default.asp?W1181) called 'bool multi condition' which can be also very useful if some have to be true and others false.
-
Thank you!
-
Hi.
i have not used this action yet but this might be very helpful as well : conditional expression