GameMaker Transparent mask that doesn't render sprites

You don't want the object to draw anything but still have a working mask?
Just add a mask in the object window without giving it a sprite.
 
L

LightWood

Guest
You don't want the object to draw anything but still have a working mask?
Just add a mask in the object window without giving it a sprite.
I have an object that has a transparent sprite, and I wannt to hide objects behind that sprite. But it is impossible cause it's transparent. In post said to create a mask that won't render any sprites. But I don't know how to create it
 
D

Dracodino300

Guest
I have an object that has a transparent sprite, and I wannt to hide objects behind that sprite. But it is impossible cause it's transparent. In post said to create a mask that won't render any sprites. But I don't know how to create it
In the object window (where you select sprites, code etc.) you can set the sprite to "none", and set the mask to what you want it to be (by default it is "same as sprite").
 
L

LightWood

Guest
In the object window (where you select sprites, code etc.) you can set the sprite to "none", and set the mask to what you want it to be (by default it is "same as sprite").
Thanks I made it, but it doesn't hide my player. All i want is to hide my player when he goes behind that object. It's like an invisible wall where player's sprite is not rendering while it's behind that wall. In case when i set some kind of sprite to that object and it's depth is lower than player's depth, that object's sprite draws on top of player's sprite. It's how the depth works. Just imagine that you are behind some transparent thing like window. For example I can see you if you are on another side of Window, because it's transparent. But in my case when you are behind window you won't be shown from another side of that window like you are not behind that window at all. I hope you understood me. So I don't know how to do it
 

2Dcube

Member
I don't know what the solution is but it seems posters in here are confusing "collision mask" with a mask used for rendering. (or not rendering in this case...)
 
L

LightWood

Guest
I don't know what the solution is but it seems posters in here are confusing "collision mask" with a mask used for rendering. (or not rendering in this case...)
Yeah, i noticed that too)
 
L

LightWood

Guest
Thank everybody who replied me. But I found a solution by myself. Just used gpu_set_blendmode
 
Top