PDA

View Full Version : Mouse Click Question


MSU4Life
02-12-2009, 09:42 PM
I need to make an object disappear w/ when it is clicked on then reappear when clicked on again. Any suggestions?

Mojax
02-13-2009, 03: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.

MSU4Life
02-17-2009, 12:39 AM
thx, but it doesn't seem to reappear when I click back on it.

Scott300
02-17-2009, 07:35 AM
This one might be a little simpler for you to understand uses no variables.

MSU4Life
02-17-2009, 03: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?

Scott300
02-17-2009, 04:08 PM
I just tested it, works fine for me =/

MSU4Life
02-18-2009, 12:49 AM
I am on a mac....does that matter?

Scott300
02-19-2009, 10:16 AM
I am not sure on that, sorry! Do you have a Windows computer to try it on?