Alice Community  

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

Reply
 
Thread Tools Display Modes
State?
Old
general
Guest
 
Status:
Posts: n/a
Default State? - 06-21-2006, 03:26 PM

I found something called State under the properties tab of tombstone(Spooky). What is it? How can I use it? And where can I learn more about this? I can't seem to find it in the Learning to Program with Alice textbook.
   
Reply With Quote
Old
lanceA
Guest
 
Status:
Posts: n/a
Default 06-21-2006, 08:29 PM

Whoever created the model for that object (tombstone) included a variable of type number and called it 'State'. Basically it stores any integer and can be used for anything you might need, i.e., maybe your world starts off with the tombstone invisible and you have set State == 1. Later on in your program you could check the value of tombstone.State and if it equaled 1 then you could make the tombstone visible (and set State to a value of not 1). In essence you're changing the 'state' of an object.

I only used the invisible/visible scenario as an example of what you could do with the State property. You could just as easily check the state of the opacity field in my example.

Treat it as a 'free' variable for the tombstone object.
   
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 ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.