View Single Post
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 978
Join Date: Sep 2009
Location: United States
Default 01-13-2010, 08:48 PM

You would need to make a method where you do "When mouse is clicked on..." and then for the object leave it on "everything", but for the action, make a separate method and make an object parameter (make sure you click the "object" bubble when making the parameter). Then in the "do..." place of the event, put in the method you just made, and for the parameter you go down to "expressions" and then "object under mouse cursor". Then in the actual method, put multiple if/else statements. This is where you list all of the things you want to change.

You can use the parameter at the top of your method as a variable, just drop it down to where you want it to go in your code
For example, if you want it to be when you click a person he turns invisible, you make an if/else in the method that says "if (parameter) == person, then make person opacity = 0", or something like that. And then if you want a certain object to get bigger when clicked on, you make an if/else "if (parameter) == otherObject, then make otherObject resize 1/2". You can make as many if/else statements for as many objects as you want in this method, while only having one event to call on them.

If you still do not understand, I will make an example world for you to see. If you do understand please tell me.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote