Author Topic: Comparing variables to other variables  (Read 1439 times)

McPopato

  • A very inconsistent user.
  • Level 4: Sparr
  • *
  • Posts: 51
  • Hello. I do projects sometimes.
    • View Profile
Comparing variables to other variables
« 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
"Friends are people who come and go, appreciate them when they're here and remember them when they're gone." - Some guy probably.

McPopato

  • A very inconsistent user.
  • Level 4: Sparr
  • *
  • Posts: 51
  • Hello. I do projects sometimes.
    • View Profile
Re: Comparing variables to other variables
« Reply #1 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.
"Friends are people who come and go, appreciate them when they're here and remember them when they're gone." - Some guy probably.

McPopato

  • A very inconsistent user.
  • Level 4: Sparr
  • *
  • Posts: 51
  • Hello. I do projects sometimes.
    • View Profile
Re: Comparing variables to other variables
« Reply #2 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].
"Friends are people who come and go, appreciate them when they're here and remember them when they're gone." - Some guy probably.

Gizgord

  • average
  • Level 18: Statix
  • *
  • Posts: 835
    • View Profile
Re: Comparing variables to other variables
« Reply #3 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 (<).

Antikore

  • Developing Mortal Theater at day, developing depression at night.
  • Level 22: Trex
  • *
  • Posts: 2020
  • Enjoying Platform Builder from the very start
    • View Profile
    • PBuilder Resources
Re: Comparing variables to other variables
« Reply #4 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 >=
Sorry because my English is not very good because I'm Spanish ;) :P

CGM

  • Christian, 3D artist, former Platform Builder gamdev
  • Master Builder
  • *
  • Posts: 3836
    • View Profile
Re: Comparing variables to other variables
« Reply #5 on: June 01, 2020, 05:02:45 PM »
Yeah, you missed those, Giz.