Playmaker Forum

PlayMaker Feedback => Action Requests => Topic started by: HeathClose on January 27, 2017, 08:52:07 PM

Title: Compare actions to include a within range
Post by: HeathClose on January 27, 2017, 08:52:07 PM
I could really use another option on a float compare action right now... we have equal, less than, greater than... but what I really need right now is Within...

I'm spawning two objects near each other, and if their Y values are within a certain range, I want it to pick a new Y value to spawn at... so within would have a space to input a number, say 3... and if the comparison comes within 3, send an event to choose another Y value.. this would keep objects from being right next to each other...

Is this already achievable?  Is this easy enough that someone could cook this up real quick?
Title: Re: Compare actions to include a within range
Post by: djaydino on January 28, 2017, 06:20:58 AM
Hi,
maybe you can use 2 float compares?  For example in the 1st compare only greater than 1, then in the second compare only less than 5. and set the state as sequence (right click and select the Action sequence option at the top)
Title: Re: Compare actions to include a within range
Post by: terri on January 28, 2017, 06:21:53 AM
there is an action called float difference, you can use that
Title: Re: Compare actions to include a within range
Post by: djaydino on January 28, 2017, 06:31:10 AM
there is an action called float difference, you can use that

Hmm... is it on the Ecosystem?
I can't seem to find it.
Title: Re: Compare actions to include a within range
Post by: terri on January 28, 2017, 09:54:07 AM
my bad I never got around to adding it

http://hutonggames.com/playmakerforum/index.php?topic=11868.msg55442#msg55442
Title: Re: Compare actions to include a within range
Post by: HeathClose on January 28, 2017, 09:58:39 PM
thank you that float difference works perfectly