Alice Community  

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

Thread Tools Display Modes
universal parameter
Posts: n/a
Default universal parameter - 10-06-2008, 06:42 AM

I want to create a world full of tiles, and an object walking on them. Now I have a colorsensor connected to alice which gives colorvalues in numers 0 to 17.

I want to change the color of the tile where the object is standing on to the value of the color sensor. But when I move to a different block I want to that to be given a different color regarding to whatever the colorsensor gives.

I want to use some sort of a collide statement which checks if the object is colliding with ANYTHING. If it is colliding(it is on op of something (anything) it needs to change that objects color.

How do I create that universal anything ??? can I do it with treshold? or should I us some sort of universal parameter?

Reply With Quote
Posts: n/a
Default 10-08-2008, 04:37 PM

I don't really understand all your question - but briefly, in Alice you cannot create a "universal" parameter. Parameters are assocated with specific methods.

You can create a "world" variable - which is essentially universal, since the world is always running. It can then be passed to a method when the method is called.
Reply With Quote

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.