Alice Community

Alice Community (
-   How do I...? (
-   -   Any From List Command Questions (

DonnySN 09-22-2011 07:24 PM

Any From List Command Questions
Ok, the project I'm working on I have a simple problem with a not so simple solution. In short I have civilians running in panic in a city, I cant have them running through buildings so I put in a script to along the lines of
for (int index=0; index<infinity times;index++){

If(person.isCloseTo 10 meters, of building{
//This makes them turn around if their close to building
doTogether {
person.move(forward, 5 meters
person.turn(left_or_right.getRandomItem(), .5 revolutions
//This makes them run around aimlessly
doTogether {
person.turn(left_or_right.getRandomItem(), .1
person.move(forward, 5 meters)

That part of the script works great, now to the problem. I have a LOT of buildings in this city. I need to get a script that checks distance from all buildings. Then I need to get a script that turns away from the closest building on the list.

Please help!!!!! I'm at a stand still 'til I can figure this out.

All times are GMT -5. The time now is 10:49 PM.

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