Alice Community  

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

Reply
 
Thread Tools Display Modes
Mouse Click Question
Old
MSU4Life
Guest
 
Status:
Posts: n/a
Default Mouse Click Question - 02-12-2009, 10:42 PM

I need to make an object disappear w/ when it is clicked on then reappear when clicked on again. Any suggestions?
   
Reply With Quote
Old
Mojax
Guest
 
Status:
Posts: n/a
Default 02-13-2009, 04:29 AM

ok first thing you need to do is create a boolean variable from the properties tab of the object you want to disappear and reappear. Call it objectVisible or whatever. Then you need to create a method with an if statement something like this.

EDIT: just realized I could attach files. So instead of the horribly typed out example code, I've included an example file instead that makes a cow disappear and appear when you click on it.
Attached Files
File Type: a2w cowDisappear.a2w (948.1 KB, 29 views)

Last edited by Mojax; 02-13-2009 at 04:58 AM.
   
Reply With Quote
Old
MSU4Life
Guest
 
Status:
Posts: n/a
Default 02-17-2009, 01:39 AM

thx, but it doesn't seem to reappear when I click back on it.
   
Reply With Quote
Old
Scott300
Senior Member
 
Status: Offline
Posts: 80
Join Date: Feb 2009
Location: Ohio
Default 02-17-2009, 08:35 AM

This one might be a little simpler for you to understand uses no variables.
Attached Files
File Type: a2w example.a2w (564.7 KB, 32 views)
  Send a message via AIM to Scott300 Send a message via MSN to Scott300  
Reply With Quote
Old
MSU4Life
Guest
 
Status:
Posts: n/a
Default 02-17-2009, 04:22 PM

Thanks, but once again it disappears, but will not reappear when I click on him. Is there any reason why this would happen?
   
Reply With Quote
Old
Scott300
Senior Member
 
Status: Offline
Posts: 80
Join Date: Feb 2009
Location: Ohio
Default 02-17-2009, 05:08 PM

I just tested it, works fine for me =/
  Send a message via AIM to Scott300 Send a message via MSN to Scott300  
Reply With Quote
Old
MSU4Life
Guest
 
Status:
Posts: n/a
Default 02-18-2009, 01:49 AM

I am on a mac....does that matter?
   
Reply With Quote
Old
Scott300
Senior Member
 
Status: Offline
Posts: 80
Join Date: Feb 2009
Location: Ohio
Default 02-19-2009, 11:16 AM

I am not sure on that, sorry! Do you have a Windows computer to try it on?
  Send a message via AIM to Scott300 Send a message via MSN to Scott300  
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 ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.