Platform Builder Forums

Main => Suggestions => Topic started by: McPopato on May 31, 2020, 07:28:12 PM

Title: Comparing variables to other variables
Post by: McPopato on May 31, 2020, 07:28:12 PM
I tested both in the current release and beta, doesn't seem to be possible to do so.
It'd be pretty good to be able to compare variables to one another (correct me if I'm wrong about this, but all my experiments yielded no working result.)
I wish to create if statements that check if a variable is greater than an another variable, but this doesn't seem to work at all currently. As such I'm suggesting it to be added to 8.0
Title: Re: Comparing variables to other variables
Post by: McPopato on May 31, 2020, 07:31:51 PM
With further testing, it's apparently possible to compare variables to one another. But I haven't had any luck comparing game variables to one another yet.
Title: Re: Comparing variables to other variables
Post by: McPopato on May 31, 2020, 07:35:47 PM
Turns out I'm wrong. I could compare game variables in 8.0 successfully. Sorry for the inconvenience.
it was if game var a = [game var b].
Title: Re: Comparing variables to other variables
Post by: Gizgord on May 31, 2020, 11:50:46 PM
one thing to note - you can check if values are:
-equal (=),
-not equal (!=),
-greater than (>),
-less than (<).
Title: Re: Comparing variables to other variables
Post by: Antikore on June 01, 2020, 09:37:58 AM
one thing to note - you can check if values are:
-equal (=),
-not equal (!=),
-greater than (>),
-less than (<).
-less or equal to <=
-greater or equal to >=
Title: Re: Comparing variables to other variables
Post by: CGM on June 01, 2020, 05:02:45 PM
Yeah, you missed those, Giz.