[quote="Maenny":3mwzhc0k]ok, here is what I do:
I have about 8 different objects with a drag and drop behaviour. I want the player not to be able to drag one object over the other, so he can only place the objects in a free space. Furthermore, I don't want the collisions to be exact, but a collision mask in a circle with a given raduis around each object. I can't use a custom collisionmask, because each object has a physic-behaviour that needs the exact collisionmask.[/quote:3mwzhc0k]
Okay then. I don't know if I fully understand, but I attempted to recreate what you described here:http://www.box.net/shared/6quet854gu
It doesn't use physics or anything, but I commented the events so you could get a handle on how the picking works.
Click and drag any red circle. If the cursor is overlapping another, unselected red circle then the one you have clicked will not update it's position.
As for performing actions on individual instances, you simply need to define the instance in the condition of the event. You can get as specific as you like with multiple conditions. Just about anything can be used to compare instances to pick them for actions... overlap, variables, position, opacity, family, whatever. As long as you have the criteria for a specific instance defined in the condition, only those object instances that meet the criteria will have the actions performed on them. This is why UIDs are all but obsolete, because there are so many ways to select individual objects for manipulation. Of course you are still free to use UID's if you like, that's why they're there, it's just that a lot of folks coming from other game makers seem to have this habit left over. It's all good, I'm sure Game Maker would be different and confusing for me if I took a crack at it
Passing arguments and re-using code could be done with the Function object, or with loops, depending on the situation. Of course, if you have a general "move around" action for all of your objects then they will all move around, unless you specifically leave some out during the picking process.
For more information about how picking works, check out the wiki. There's some more in-depth stuff there: http://sourceforge.net/apps/mediawiki/c ... ct_picking
Oh, and as for your setting the elasticity of an object at runtime, you might want to hit up the Feature Request forum for that. Physics is David's baby, you might be able to convince him to add that in there. I know his creed is to make things as good as they can be, I'm sure he'll look into it eventually if you ask nice and don't call him a lazy Australian