Alice Community

Alice Community (
-   How do I...? (
-   -   Object Variables (is there a way?) (

Matchewawa 03-21-2011 07:01 PM

Object Variables (is there a way?)
I'm setting up collision on a level, but it is extremely tedious and time consuming. I know there is a way to make an object variable that represents a list of objects, but when I put it into a function, it doesn't allow me to use all of the objects in the list at once. What I'm trying to do is basically 'if you hit this object, (or in this case, any of THESE objects) you move back.'

reuben2011 03-21-2011 07:08 PM

Have you tried using the "for all together" statement?

Matchewawa 03-21-2011 07:20 PM

1 Attachment(s)
How would I use a for all together in this situation. (the highlighted
area is where the list of objects would go)

debussybunny563 03-21-2011 09:23 PM

1 Attachment(s)
[SIZE="2"]First, define a list, and put all the objects you want collision to be possible with in that list (the <none>s in your screenshot). (1.)

Then, use the For All Together statement like in the screenshot. (2.)[/SIZE]

Matchewawa 03-22-2011 04:31 PM

Awesome AWESOME, THANKS! That'll help sooo much!!!

debussybunny563 03-22-2011 05:12 PM

[SIZE="2"]No problem. And to see a great example of collision detection in Alice at work, look at [URL=""][SIZE="2"]Dameria's Maze Game.[/SIZE][/URL]

You might want to ask Dameria about the coding. He's kind of the unofficial expert on collisions. ;)

Collision detection in Alice is really not as easy as it may seem.[/SIZE]

reuben2011 03-22-2011 07:23 PM

Collision detection in Alice is really not as easy as it may seem.[/SIZE][/QUOTE]

Very true. Especially if you want to have a "good" collision detection system.

All times are GMT -5. The time now is 08:17 PM.

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