Playmaker Forum

PlayMaker Feedback => Action Requests => Topic started by: Dev_Sebas on March 18, 2012, 08:23:00 PM

Title: Int compare + between function
Post by: Dev_Sebas on March 18, 2012, 08:23:00 PM
Hi guys!
I need to compare if my int is between 2 another ints.
Is there are already any action who can make this? I need it.
If not can someone make an int compare with between function? ::)
Please I need it.It´s very important. ;)
Bye
Title: Re: Int compare + between function
Post by: jeanfabre on March 19, 2012, 01:37:36 AM
Hi,

 using "int compare" action will allow you do that.

you can compare two integer and see if the first one is less than , equal or greater than

so, make one state with two of these actions.

the first action will check against the minimum and throw a "Fail" event only if it is below the minium, it not it will go to the next action that will compare against the maximum, if it is above the maximum throw the same fail event. at that point it will call the "finish" event if you have it as a transition.

But I made an action to do this in one step and also so that checking for this everything is easier:

http://hutonggames.com/playmakerforum/index.php?topic=1237.0 (http://hutonggames.com/playmakerforum/index.php?topic=1237.0)

Bye,

 Jean
Title: Re: Int compare + between function
Post by: Dev_Sebas on March 19, 2012, 07:52:09 AM
I think you are right Jean.Your idea is very useful.
Thanks a lot for the action.
Bye