Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Speaking in Hours
Old
jpolk
Guest
 
Status:
Posts: n/a
Default Speaking in Hours - 07-15-2010, 05:37 PM

How do I make the ninja speak the return of world.time in hours?
Attached Files
File Type: a2w Road to Hana.a2w (947.5 KB, 6 views)
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 07-15-2010, 09:28 PM

You can look at my clock program in my signature if you want to.

To make a variable into a string of characters, you have to use the world.function called "(what) as a string" or something like that. Then for the variable "(what)", you will put in the world.hour variable. Oh, you will probably also want to use the function to concatenate (join together) two strings, it should be near the function I just explained. You might have to use it several times, just try different things and see what works (use your brain, shouldn't be too hard at all). You will join together whatever you want to say with the "(world.hours) as a string" function, and then maybe some other string after that if you want to.

Hope it helped, if you are still confused ask and I will do an example.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote
Thanks!
Old
jpolk
Guest
 
Status:
Posts: n/a
Default Thanks! - 07-16-2010, 07:39 PM

Thanks that was a big help, once I used the A join to B function to join my two strings together. Oh yeah nice clock! You can check out what I got now if you want!
Attached Files
File Type: a2w Road to Hana.a2w (948.8 KB, 21 views)
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



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