PDA

View Full Version : Possible to change list item properties?


fox121
11-25-2009, 07:28 PM
I'm trying to do a collision detection setup where items in a list sink if my boat gets too close to them.

I have the code to tell if the boat is close or not -- but how do I tell Alice to just sink the ONE item it's close to?

Thanks in advance for any help :)

x2495iiii
11-25-2009, 07:52 PM
Check out the world found under "Examples" called flightSimulator. It demonstrates how to register colliding with rings and making them disappear.

fox121
11-25-2009, 08:11 PM
Eek! hehe

I thought you wouldn't give out helps like that -- I'm a student, and I don't want to get in trouble. Even used my college username for my forum sign in...lol

In any case..I don't see an examples forum, or page on the main site so, I think I'm safe :)

I guess what I'm asking is...general direction? Perhaps like when I helped a fellow student and said, check out the functions for this item, keep trying since Alice is a bit squirrelly sometimes...

Can you point me loosely in the right direction? :)

Thanks again!

x2495iiii
11-25-2009, 09:21 PM
Open Alice, then click the Examples tab to see several demo worlds that were included by the Alice developers to show what Alice can do, making them fair play to look at and learn from.

fox121
11-25-2009, 10:48 PM
Arrrrgh :/

Thanks muchly for the help -- but I still can't figure out what I'm doing wrong. I'm not sure why Alice has to be so much more difficult than regular c# programming...lol Been working at this particular step for 5 hrs now, and ready to pull hair out (not necessarily mine, I think Alice would look great without hair! *g*)I'm sure it's a matter of not thinking outside the box somehow..../sigh

I can't seem to create a class level list or array (either, tried both) assign it 5 objects, and if my boat gets too close to one of those objects, the object sinks. Resume "collision detection" and on to the next. I *did* get it to detect an item, and sink the FIRST item in the list. That wasn't the item to be sunk, however....nor did it resume detection. (it *was* in a loop, so not sure why)

In c# I could have it return the value of the item in the index that caused the collection detection, and therefore sink it by name, then check to see if the list was empty, if not, resume. How in Hades do I do that in Alice?? LOL

Sorry if I'm seeming dense...

dubastot
11-26-2009, 04:09 PM
Why don't you post your world and x249iiii or I can check it out and tell you what to fix.