How do I check "Is NOT Highest"?

0 favourites
  • 5 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • I can set up an event that reads "If object var is highest - Do something".

    I'd like to be able to have an event that will do something to an object if it's variable NOT the highest. I can check for lowest, but that doesn't cut it. It's a pick event, so it won't allow me to simply invert.

    Did a search on the forums, but couldn't see anything.

    Any help is appreciated.

    Thanks!

  • First pick the highest, then save that value to another variable. Then in a sub event, pick all, then pick by conditions, and then you can use the saved value to compare against with a system - compare values.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • First pick the highest, then save that value to another variable. Then in a sub event, pick all, then pick by conditions, and then you can use the saved value to compare against with a system - compare values.

    Yeah, I came to the same conclusion after I'd posted, though I had hoped for a single event solution without the need for a variable.

    Thanks though!

  • I try not to use a for each loop, as it tends to slow my games down. I suppose I could add a time to it to limit the number of loops... less accurate, but it has potential.

  • Try to avoid being too spartan regarding number of events - it generally has no discernible effect on performance, while usually having a clear effect on readability and coding time.

    Avoiding loops where they are not appropriate is a fair though.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)