Alice Community  

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

Reply
 
Thread Tools Display Modes
Help needed!!!! - How to make an object disappear?
Old
cowsmoo
Guest
 
Status:
Posts: n/a
Default Help needed!!!! - How to make an object disappear? - 09-02-2008, 10:56 AM

Hello! i'm doing a game for school using alice, and i need help with my game.. i need my wolf to disappear when it comes in contact with the chicken... and i know i'm supposed to use either opacity/isShowing to acheive that effect.. i think? but i've been at it for 3 days and i still can't make the gumdrop disappear even if the chicken is right next to it! =( can anyone please help me with this?

haha.. all help would be greatly appreciated.. thanks =)

Last edited by cowsmoo; 09-02-2008 at 08:37 PM.
   
Reply With Quote
Old
DrJim
Guest
 
Status:
Posts: n/a
Default 09-02-2008, 01:44 PM

Suggest you post the world - hard to say what your problem is from the description.

Only other suggestion is to look at the "if" statement you use to try to make something disappear and remember that the "distance to" test is from object center to object center. (Lots more detail on this in the texts and tutorials.)
   
Reply With Quote
Old
cowsmoo
Guest
 
Status:
Posts: n/a
Default 09-02-2008, 08:36 PM

oops.. sorry for not posting the world earlier on.. but attached is what i did.. my main aim was for the randomly moving chicken to 'eat' the gumdrop when the chicken came into close proximity of the gumdrop. i tried that with both opacity and isShowing but none of them seems to work! please advice? thanks alot!! =)
Attached Files
File Type: a2w chickenwack.a2w (281.9 KB, 50 views)
   
Reply With Quote
Old
DrJim
Guest
 
Status:
Posts: n/a
Default 09-03-2008, 02:22 PM

Your problem actually had nothing to do with opacity or "isShowing" settings. It was just that the first while loop never ended - since the test condition was locked to true.

A full explaination is a bit long for here - but check your text(s) or Dick Baldwin's tutorials for more detail.

I did attach a world which should get you started. Note that all your "whiles" were really not needed at this stage, nor was some other code. I did add a marker to locate the position and orientation of the gumdrop - so you could see what is happening to it. Obviously, you could get rid of this later.

Bottom line - try to develop and test your code in small bits and pieces (i.e., incrementally). It's much easier to figure out what is going wrong - and, per Murphy's Law, something always will.
Attached Files
File Type: a2w mod_chickwack.a2w (274.5 KB, 66 views)
   
Reply With Quote
Old
cowsmoo
Guest
 
Status:
Posts: n/a
Default 09-04-2008, 02:01 AM

alright then.. thanks for your help.. i'll try to figure out what went wrong... hahaha.. thanks so much once again! =D
   
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 ©2017, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.