• 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!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Legacy GM My Collision Mask won't work??

K

Kenzo

Guest
Pretty sure I'm just brain farting here, I'm wondering why my Collision Mask isn't working. I have Precise Collision Checking enabled.
Here's what I have for the Mask Properties:
upload_2017-12-29_16-17-8.png

In the room using this wall collision mask, I have an object with the creation code of:
'sprite_index = sprWall_room_TrueDawn;' Setting the 'Walls' of this room to that sprite.

But when I test this, the character doesn't collide with these boundaries and walks across the room without walls! Please help :(
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
May need to use Alpha Tolerance of at least 1 for anything to be considered for collisions.
 

Bentley

Member
Pretty sure I'm just brain farting here, I'm wondering why my Collision Mask isn't working. I have Precise Collision Checking enabled.
Here's what I have for the Mask Properties:
View attachment 15386

In the room using this wall collision mask, I have an object with the creation code of:
'sprite_index = sprWall_room_TrueDawn;' Setting the 'Walls' of this room to that sprite.

But when I test this, the character doesn't collide with these boundaries and walks across the room without walls! Please help :(
Do you mind posting the movement / collision code you have?
 
K

Kenzo

Guest
Do you mind posting the movement / collision code you have?
'Wall' detection:

Code:
var maxarg;
var i = 0;

if argument0 = 0
{
    x = round(x);
    maxarg = abs(xSPD);
    if (place_meeting(x +xSPD, y, argument1))
    {
        while (!place_meeting(x+sign(xSPD), y, argument1) && i < maxarg)
        {
            x += sign(xSPD);
            i++;
        }
        xSPD = 0;
    }
}
else if argument0 = 1
{
    y = round(y);
    maxarg = abs(ySPD);
    if (place_meeting(x, y + ySPD, argument1))
    {
        while (!place_meeting(x, y + sign(ySPD), argument1) && i < maxarg)
        {
            y += sign(ySPD);
            i++;
        }
        ySPD = 0;
    }
}
else
{
}
 
K

Kenzo

Guest
I forgot to mention***
The wall detect and walking scripts have been working fine, it's just this one room that is the oddball***
 

Bentley

Member
Hmm, Idk. I usually don't use precise collision. Could it be that the player must also have precise collision checked?
 
K

Kenzo

Guest
Hmm, Idk. I usually don't use precise collision. Could it be that the player must also have precise collision checked?
I ended up replicating my previous rooms and just adjusting the backgrounds/collision sprites... Works fine but I'll never know why It doesn't work when I try to make them from scratch. Thanks for your support ;P
 
Top