alice-teacher Object checking opacity of a vehicle

Rikki Fletcher fletcher at csusm.edu
Fri Jan 13 18:19:58 EST 2012


When I have problems with Alice not "letting" me do things - I usually
work around with temp variables that I assign as needed.  I set things up
as Alice likes with a default anything, then drag the temp variable where
I want it.

> Question from a student who is trying to figure out a way to have an
> object check the opacity of a current object vehicle. Any suggestions?
>
> I have a problem. I have 5 helicopters in my alice program and I have a
> missile attached to each (their vehicle is set to one of the helecopters).
> I have all of my misiles in a list and I want to be able to treat the
> current object's vehicle in a for all in order list as a regular object
> (Ideally setting a variable to item_from_missile_list.vehicle) and then I
> want to be able to check the vehicle's opacity (I want to do this so I can
> check whether or not the helicopter is visible or "alive" and perform an
> action accordingly). However, Alice won't let me drop the
> item_from_missile_list.vehicle into an opacity function (ie opacity =
> randomObject.opacity), and I'm not really sure why its doing this. Do any
> of you have any idea why this is, how to fix it or any potential
> workarounds?
>
> Mr. Scott Findley
> sfindley at sd43.bc.ca<https://webmail.sd43.bc.ca/owa/redir.aspx?C=0a9bf7b1630b4554891428589166e563&URL=mailto%3asfindley%40sd43.bc.ca>
> Gleneagle Secondary School
> http://gleneagle.org<https://webmail.sd43.bc.ca/owa/redir.aspx?C=0a9bf7b1630b4554891428589166e563&URL=http%3a%2f%2fgleneagle.org%2f>
> Mr. Findley's Homeroom
> Site<http://teachers.sd43.bc.ca/sfindley/default.aspx>    Twitter @
> rsfindley<http://twitter.com/rsfindley>    Mr. Findley's Blog @
> Posterous<http://sfindley.posterous.com/>    Writing 12 Posterous
> Site<http://writing12.posterous.com/>
> 1195 Lansdowne Drive, Coquitlam, BC V3B 7Y8  604.464.5793 / 604.464.5796
> (F)
> While email is repeatedly checked, I typically reserve an hour daily for
> correspondence. Should you need a more immediate reply, please flag your
> message as urgent. Any emails received without a clear indication of the
> sender will receive no response.
>
> This e-mail (including attachments, if any) may be privileged and/or
> confidential, and the sender does not waive any related rights and
> obligations. Any distribution, use or copying of this e-mail or the
> information it contains by other than an intended recipient is
> unauthorized. If you received this e-mail in error, please advise me (by
> return e-mail or otherwise) immediately.
>
> Unless absolutely necessary, please do not print this email for
> environmental reasons.
>
>
>
> _______________________________________________
> alice-teachers mailing list
> alice-teachers at lists.andrew.cmu.edu
> https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers
>





More information about the alice-teachers mailing list