ID:1560948
 
Keywords: click, macro, shift
(See the best response by Ter13.)
I do not know how to approach this situation, I'd like to have an object preform a different action from when clicking, to when clicking while holding a macro (Shift). Any ideas?
Best response
Look up the mouse functions in the guide. By default, all mouse functions give you access to a params argument which will allow you to detect specific modifier keys, as well as which mouse button was pressed for the event.
Thanks, Ter13. You are always so helpful to us newbies.
mob
Orb
icon='orb.dmi'
DblClick(obj,map,shift)
usr << "Hello."
//needs to be able to do the requiered action only when shift is being held.
So, I'm trying to figure out these params for click. I seem to be failing, as usual.
Dealing with params is extremely simple once you know the best way to deal with them.

For instance, you could use findtext(), to look through a param for values, or you could use param2list() to convert the param to a list. I personally prefer converting it to a list, because it does make life much easier and allow for more complex analysis of the values.

Something that would work:
atom/Click(location,control,list/params)
usr<<"Here are the params ( [params] )"
params=params2list(params)
if("shift" in params)
usr<<"Shift was held!"


At this point, I'd like to suggest you read into list indexing (if you haven't already). Adequate knowledge of list indexing not only helps with it comes to params, but is very idea for creating more advanced systems.
Thank you, this helped me a lot. I'm going to be looking into lists more than I already have :P