• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Many collision masks ?

E

Erik131313

Guest
Hi,
An object is rectangle with 2 little rounds (see picture).
When my mouse meet the object (rectangle or rounds), I can move the objet on the screen "if position_meeting(mouse_x, mouse_y, global.rect[0]) and mouse_check_button_pressed(mb_left)". It use the collision mask that I can modify.

When my mouse meets a round of the object, I want do something and when my mouse meets the rectangle of my objet, I wand do something else. How should I do it ?

Is it possible to use 2 or 3 différent collision masks on the same objet ?
I can compare the x and y of my objet and my mouse but it's not easy to do.
 

Attachments

Slyddar

Member
Life would be easier if you make 2 separate objects, 1 circle object, and 1 rectangle, and just use 2 instances of the circle with a creation code flag to identify which one is which. Then you can just have one mouse enter/leave event in each object.
 
Top