Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: jess84 on December 15, 2013, 01:49:53 PM

Title: How to check float is 0? [SOLVED]
Post by: jess84 on December 15, 2013, 01:49:53 PM
I've been driving myself bad trying to figure this out, I assume it's probably very simple though.

I have a consumable item, and when you've used all 10, I want it so that you cannot click the GUI texture item to equip the item again.

Float Sign Test doesn't work as the IsPositive is catching 0 as a positive

Float Switch doesn't work as whilst I can check for Below 1 as trigger an action, I can't get through that state is the float is 1 or greater

What's the way of checking if a float = 0?

Title: Re: How to check float is 0?
Post by: escpodgames on December 15, 2013, 03:16:38 PM
Float compare
Title: Re: How to check float is 0?
Post by: jess84 on December 15, 2013, 03:18:38 PM
But that's to compare 2 floats, right?

Or are you saying I should create another float as my 'target' float, 0 ?
Title: Re: How to check float is 0?
Post by: escpodgames on December 15, 2013, 04:51:32 PM
You can compare your consumable item float to '0'

see image :)
Title: Re: How to check float is 0?
Post by: jess84 on December 15, 2013, 04:59:40 PM
Ah, awesome thanks.

(I originally looked at that, but thought it required 2 actual float variables - I didn't expect it to accept a manual value)