Page 1 of 1
Float or Double Variable as an Actor Variable?
Posted:
Thu Jun 07, 2012 5:03 pm
by happyjustbecause
I want to have a float or double variable rather than an integer used for my enemies hp, to be able to have decimals, but I need it to be an actor variable. Can I do this? Is it already not a global variable? If I can't use float or double for this, what can I use?
Re: Float or Double Variable as an Actor Variable?
Posted:
Thu Jun 07, 2012 5:04 pm
by skydereign
Yes you can. Set the variable type to real (same thing as double), and make it an actor variable.
Re: Float or Double Variable as an Actor Variable?
Posted:
Thu Jun 07, 2012 5:09 pm
by happyjustbecause
Oh, I didn't realize or I forgot that that's what a "real" variable is, okay thank you!
Re: Float or Double Variable as an Actor Variable?
Posted:
Thu Jun 07, 2012 7:22 pm
by SuperSonic
Out of curiosity, what is the difference between float and double?
Re: Float or Double Variable as an Actor Variable?
Posted:
Thu Jun 07, 2012 9:57 pm
by skydereign
It is really just the size. A float is usually 4 bytes, while a double is 8. This means much larger range for the double.
Re: Float or Double Variable as an Actor Variable?
Posted:
Fri Jun 08, 2012 12:43 am
by SuperSonic
Are there any behavioral differences? Or is it just size?