playMaker
Home
Store
Showcase
Tutorials
Forums
Manual
Wiki
About Us
Playmaker Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Join our
Discord Channel
Home
Help
Search
Login
Register
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
»
Why is my float setting itself to "-infinity" ? [SOLVED]
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Why is my float setting itself to "-infinity" ? [SOLVED] (Read 1784 times)
Mulbin
Junior Playmaker
Posts: 90
Why is my float setting itself to "-infinity" ? [SOLVED]
«
on:
January 30, 2017, 10:21:44 AM »
I'm having real trouble subtracting on float from another. The process should be very simple, the float starts at a fixed value of 3000, then every second it should subtact the value of another float. But as soon as the game starts instead of subtracting the value it just sets itself to negative infinity.
Any suggestions?
«
Last Edit: January 30, 2017, 12:57:09 PM by Mulbin
»
Logged
mdotstrange
Hero Member
Posts: 555
Re: Why is my float setting itself to "-infinity" ?
«
Reply #1 on:
January 30, 2017, 12:42:38 PM »
You could try adding a Float Clamp- and clamp the power reserve min at 0-
I've seen behavior like this if the calculation starts before the variable has been populated so it might be doing the subtract before the powerReserve variable is set?
Logged
Indie game dev and instructor at the Strange School.
Learn Playmaker at the Strange School!
Mulbin
Junior Playmaker
Posts: 90
Re: Why is my float setting itself to "-infinity" ?
«
Reply #2 on:
January 30, 2017, 12:56:33 PM »
That's it! Thanks, working fine now I have clamped.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
»
Why is my float setting itself to "-infinity" ? [SOLVED]