playMaker

Author Topic: Compare three variables[SOLVED]  (Read 2083 times)

KellyRay

  • Full Member
  • ***
  • Posts: 170
Compare three variables[SOLVED]
« on: November 14, 2013, 11:51:27 AM »
What would be the best way to compare a variable against two other variables? I'm thinking of a range. If variable 1 is greater than this var 2 send event x if less than var 3 send event y.

Any thoughts?
« Last Edit: November 15, 2013, 05:58:27 AM by jeanfabre »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Compare three variables
« Reply #1 on: November 14, 2013, 12:09:52 PM »
Its a matter of sequencing, which is the priority decision?

You can use a single State and put Int Compare actions in a comparison sequence of priority. You can only fire one event, so you only need to compare one of the variables at a time and if the condition is not met (ie X is not greater than Y) then choose blank events and it will proceed through the state and execute the next action (compare X to Z).

Make sense?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

KellyRay

  • Full Member
  • ***
  • Posts: 170
Re: Compare three variables
« Reply #2 on: November 14, 2013, 06:09:15 PM »
Yes, I got it now. I was trying to make it harder than it needed to be. Thanks!