Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   Number (http://www.alice.org/community/showthread.php?t=4069)

Zack Strife 03-12-2010 04:02 PM

Number
 
I need to know, is there a way to set a string as a number variable (such as time or health) without having the .0 at the end?

Veryuhbull 03-12-2010 05:47 PM

Hmm... i remember doing that once before but after trying for more than 15 minute i cannot replicate the process. I normally just cheat and place the number to the side of the screen and program it to stay in a place so that one can never see the stupid .0 hanging off. I bet someone else knows.

rankhornjp 03-12-2010 08:17 PM

2 Attachment(s)
Create Variable: world.number
Create 3d text: "0"

Create new method:
3d text: set text to "0" as a string.
replace "0" with random number function
click more: interger only==true; min ==world.number; max==world.number

You can place it in a loop. Or create an event (While the world is running do: During: "method")

Zack Strife 03-17-2010 02:24 PM

not what I meant. I wanted it to show the number without even the .0 so it just shows 1 instead of 1.0

rankhornjp 03-17-2010 04:02 PM

1 Attachment(s)
Yea, that's what that line of code does:)

Zack Strife 03-26-2010 03:56 PM

1 Attachment(s)
It didn't work for me this is how it looks on mine. what kind of computer do you have

rankhornjp 03-26-2010 08:07 PM

I'm using a PC with Alice 2.0

Zack Strife 03-26-2010 09:00 PM

I have 2.2 that must be the difference

jediaction 03-26-2010 09:04 PM

Alice 2.2 makes a big difference in variables. If you are using variables (which you did) its gonna make a difference everytime just to tell you

Zack Strife 03-26-2010 09:18 PM

Ah, ok


All times are GMT -5. The time now is 10:55 PM.

Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.