can i use a mask for objects (for colliding)?

Started by MisterN, November 19, 2011, 10:52:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MisterN

if any of you have ever used game maker, then im sure you know what the mask is. Any collisions are delt with, with the mask (and not the sprite). Is there a way to do a mask in bennu? For I bet that would make collisions alot better looking lol.
werg

SplinterGU

it was an idea that I had time ago... not yet available... but in the future maybe.

collision mask exists since ZX-Spectrum time.
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

MisterN

so theres no current collision mark system? otherwise the character will sometimes stick into things and float. with collision marks isntead, itll all be k.
werg

SplinterGU

you can use a ghost (of your visible character) collision process with a mask graph and alpha=0...
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

MisterN

werg

SplinterGU

2 process... 2 graphs (1 for the character, 1 for the mask)... same coords x and y... you can use z for put on the mask's process behind the character's process... and you need define the alpha of the mask's process to 0 (zero)... your collision instead of collide with the character's process must collide with mask's process... it is all folk...

very easy.
Download Lastest BennuGD Release: http://www.bennugd.org/node/2


SplinterGU

really? sorry, I'm real sorry... maybe some other guy can you explain better than me... please, excuse me...
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

gecko

it's exactly as splinter said.

You have your normal process, with your normal graph. Then you create a second process with the graph that you want to use as a collision mask, an alpha value of 0, and make it follow the other process every frame. Then you manage the collisions with this second process, that's all.
Torres Baldi Studio
http://torresbaldi.com

SplinterGU

I forget say... alpha=0 will make the process invisible.
Download Lastest BennuGD Release: http://www.bennugd.org/node/2