playMaker

Author Topic: return lowest float from a set of variables.  (Read 2844 times)

Sjones

  • Full Member
  • ***
  • Posts: 203
return lowest float from a set of variables.
« on: April 26, 2013, 11:57:17 AM »
I need to get the lowest number from several float variables - can someone make a script or point me in the direction using existing actions.

thanks.

Maart

  • Junior Playmaker
  • **
  • Posts: 88
Re: return lowest float from a set of variables.
« Reply #1 on: April 26, 2013, 06:21:47 PM »
Put your floats in an array.
Sort the array.
Get the one on the top.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: return lowest float from a set of variables.
« Reply #2 on: May 13, 2013, 06:29:59 AM »
Hi,

 Yes, simply use ArrayMaker for this:

https://hutonggames.fogbugz.com/default.asp?W715

One could build a custom action for this to avoid the overhead of using ArrayMaker. Tell me if you can't make it happen, I'll do a simple custom action.

bye,

 Jean