Alice Community  

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

Reply
 
Thread Tools Display Modes
Count and print decrements
Old
Kianna Velene
Guest
 
Status:
Posts: n/a
Default Count and print decrements - 07-08-2009, 12:22 PM

Hi, I'm trying to figure out where the decrement and increment funtions are. I've been looking for forever and it's killing me now. what I have is a loop that uses a count variable and right now when the user enters a number the count continuously goes forever and I think a use of a decrement will stop it.

Could someone please point me in the right direction?
   
Reply With Quote
Old
Veryuhbull
Guest
 
Status:
Posts: n/a
Default 07-08-2009, 12:55 PM

When you drag the number varible into your method this menu will pop up

set value
increment by 1
decrement by 1

loops continue to loop until they reach their index. (how many times) you can break a loop by inserting a method to reach the index thus ending the loop.

loops will not look at commands beyond them while "While" does look beyond.
Attached Files
File Type: a2w loop breaker.a2w (190.2 KB, 16 views)
   
Reply With Quote
Old
Kianna Velene
Guest
 
Status:
Posts: n/a
Default 07-08-2009, 03:08 PM

I was using a while to set a loop.
Attached Files
File Type: a2w assignment 8.a2w (3.66 MB, 12 views)
   
Reply With Quote
Old
Veryuhbull
Guest
 
Status:
Posts: n/a
Thumbs up 07-08-2009, 03:35 PM

Oh that wasn't too bad. This is something you can loop. How's this?

And may I suggest using "Do togheter" tags to speed up the ghost.vanish animation?
Attached Files
File Type: a2w uptothenstop.a2w (2.60 MB, 5 views)
   
Reply With Quote
Old
Kianna Velene
Guest
 
Status:
Posts: n/a
Default 07-08-2009, 04:26 PM

Sorry computer is really slow. CTX. I think I got it now right?
Attached Files
File Type: a2w assignment 8.a2w (3.66 MB, 11 views)
   
Reply With Quote
Old
Veryuhbull
Guest
 
Status:
Posts: n/a
Default 07-08-2009, 06:55 PM

I don''t see why you incremented the count by 1 then had a print command. it resets every loop and is not needed. Unless you have other plans for that odd number. But it is looped right. And the skullelton dance ends up weird but you probably are working on that already.
   
Reply With Quote
Old
dubastot
Senior Member
 
dubastot's Avatar
 
Status: Offline
Posts: 661
Join Date: Apr 2009
Location: Two Steps From Hell
Default 07-17-2009, 10:20 PM

How do you make a number variable a string because I am doing a health system with numbers.
   
Reply With Quote
Old
Niteshifter
Guest
 
Status:
Posts: n/a
Default 07-18-2009, 02:05 AM

Quote:
Originally Posted by dubastot View Post
How do you make a number variable a string because I am doing a health system with numbers.
Go to the World's function tab and scroll down until you see the "toString" or "What as a string" function. Once you do that just put it into the string variable you're using and then drag the number, object, etc. into the function box.
   
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 ©2023, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.