Alice Community  

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

Reply
 
Thread Tools Display Modes
Object Variables (is there a way?)
Old
Matchewawa
Member
 
Status: Offline
Posts: 32
Join Date: Feb 2011
Default Object Variables (is there a way?) - 03-21-2011, 07:01 PM

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.'
   
Reply With Quote
Old
reuben2011
Senior Member
 
reuben2011's Avatar
 
Status: Offline
Posts: 489
Join Date: Sep 2009
Location: Hawaii
Default 03-21-2011, 07:08 PM

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


Projects
-Escape the Kitchen
-That ninja animation
-Hill Collision

Upcoming Projects
-Some penguin adventure game?
   
Reply With Quote
How?
Old
Matchewawa
Member
 
Status: Offline
Posts: 32
Join Date: Feb 2011
Default How? - 03-21-2011, 07:20 PM

How would I use a for all together in this situation. (the highlighted
area is where the list of objects would go)
AliceIssue.jpg
   
Reply With Quote
Old
debussybunny563
Senior Member
 
debussybunny563's Avatar
 
Status: Offline
Posts: 852
Join Date: May 2010
Arrow 03-21-2011, 09:23 PM

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.)
Attached Images
File Type: jpg forAllTogether01.JPG (74.1 KB, 19 views)


Last edited by debussybunny563; 12-21-2012 at 12:00 AM.

|--------------------------------------------------------------------------------------------------|
|Link to weapons collection: http://www.alice.org/community/showthread.php?t=7368 |
|--------------------------------------------------------------------------------------------------|

I have been dead for quite some time now; not much hope for resurrection.
   
Reply With Quote
Thanks
Old
Matchewawa
Member
 
Status: Offline
Posts: 32
Join Date: Feb 2011
Default Thanks - 03-22-2011, 04:31 PM

Awesome AWESOME, THANKS! That'll help sooo much!!!
   
Reply With Quote
Old
debussybunny563
Senior Member
 
debussybunny563's Avatar
 
Status: Offline
Posts: 852
Join Date: May 2010
Default 03-22-2011, 05:12 PM

No problem. And to see a great example of collision detection in Alice at work, look at Dameria's Maze Game.

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.


Last edited by debussybunny563; 12-21-2012 at 12:00 AM.

|--------------------------------------------------------------------------------------------------|
|Link to weapons collection: http://www.alice.org/community/showthread.php?t=7368 |
|--------------------------------------------------------------------------------------------------|

I have been dead for quite some time now; not much hope for resurrection.
   
Reply With Quote
Old
reuben2011
Senior Member
 
reuben2011's Avatar
 
Status: Offline
Posts: 489
Join Date: Sep 2009
Location: Hawaii
Default 03-22-2011, 07:23 PM

Quote:
Originally Posted by debussybunny563 View Post

Collision detection in Alice is really not as easy as it may seem.
Very true. Especially if you want to have a "good" collision detection system.


Projects
-Escape the Kitchen
-That ninja animation
-Hill Collision

Upcoming Projects
-Some penguin adventure game?
   
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 ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.