Solution: Use integers as string without decimal -
05-20-2008, 03:34 PM
Well, I was looking around, trying to find the solution, and I wasn't getting any response, so I spent some time trying to look for different methods to use an integer in a string (I used mine in a 3D text) without the decimals.
It took me some time, but I finally found a way to accomplish this:
I'll show you something from my health bar.
Also a part of this, I created a number variable (realize, in my health bar example) within the method to help me with the printing. You could actually go around using this variable, but I like having the entire code in sight.
Heres how I did it:
[world.health] set value to (world.health - world.damaging)
[realize] set value to [random number [integer only=true][minimum=world.health][maximum=world.health]]
[health meter] set text to [[HP:] joined with [[realize as a string] joined with [100]]]
Hope thats not too confusing =D
|