playMaker

Author Topic: Detect value got more or less?  (Read 962 times)

zori

  • Playmaker Newbie
  • *
  • Posts: 3
Detect value got more or less?
« on: August 05, 2018, 07:29:41 PM »
Hey guys, is there any way to detect if a int or float is more, or less?

If int is more (far from zero)> fire event
If int is less (or closer to zero) > fire event

Int 5 > fire event > add score
Int 4 > fire event > remove score

I have a building game where you will get a score if you place an object, and you will lose score if you remove an object from the scene, it's a decorating game, and I counting object with a get scene tag count listener.

I want to handle my "score management" with detecting the placed game objects tags in the scene, and then store the value in int or convert them to float, then this is where I need an action for detecting "more or less" if an object gets removed from the scene, the tags will be smaller, so we have to fire the "remove score" event, because our value got smaller, if an object get placed, the tags will be more, so fire the "add score" event, because our value got bigger.

So my question, is the any way to detect an int is closer to zero, or far from zero?

Thanks for help!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Detect value got more or less?
« Reply #1 on: August 06, 2018, 05:35:48 AM »
Hi.
I believe that there is a custom action on the Ecosystem called 'int compare range' maybe that is what you are looking for