playMaker

Author Topic: Easy way of getting highest value of multiple floats?  (Read 2485 times)

jess84

  • Hero Member
  • *****
  • Posts: 515
Easy way of getting highest value of multiple floats?
« on: March 14, 2014, 08:10:01 PM »
Hi,

I have 20 global floats that I want to check for the highest value. I then want to store that as another float.

I've been looking through the actions, and don't see anything to use.

Is there an easy way of checking this?

Splankton

  • Sr. Member
  • ****
  • Posts: 268
Re: Easy way of getting highest value of multiple floats?
« Reply #1 on: March 15, 2014, 05:05:45 PM »
I had a similar problem, just use jeans arraymaker, stick them in an array and get the highest value.

jess84

  • Hero Member
  • *****
  • Posts: 515
Re: Easy way of getting highest value of multiple floats?
« Reply #2 on: March 16, 2014, 08:36:55 AM »
Thanks for the advice... I think Arraymaker may be the way to go.

It now looks like what I actually want is to check all 20 floats and send an event when they are all 0. Is there an action around to check for that? "All floats = 0" ?

Or is that something easy to do in arraymaker too?

Or do I have to set up 20 individual checks linked together?

psypol

  • Playmaker Newbie
  • *
  • Posts: 39
Re: Easy way of getting highest value of multiple floats?
« Reply #3 on: March 16, 2014, 09:43:56 AM »
hello.

maybe you can loop trough your array summing up all cells values.
when the sum = 0 then all of them = 0

(a sort of checksum)