GameMakerHelper
11-08-2009, 12:48 AM
#If staff/rules/both permit#
Go ahead and #Link to downloads, upload downloads, of games, examples, tutorials etc.#, get help on, ask for help on, give help on, teach stuff etc. about Game Maker!!!
Me here is what I know about Game Maker
x- is left
x+ is right
y- is up
y+ is down
ObjCharacter and ObjWall so say you/other(s) want to have left side of wall and top side of wall to be solid. Do this in either collision event or step event:
if ( hspeed> 0 && y < ObjWall.y )
{
other.solid = true;
move_contact_solid(direction,12);
hspeed = 0;
}
if ( vspeed> 0 && y < ObjWall.y )
{
other.solid = true;
move_contact_solid(direction,12);
vspeed = 0;
}
if ( vspeed< 0 && y > ObjWall.y )
{
other.solid = false;
}
if ( hspeed< 0 && y > ObjWall.y )
{
other.solid = false;
}
//first collision on left, next is collision on top, next is
//collision on bottom and finally collision on the right.
Go ahead and #Link to downloads, upload downloads, of games, examples, tutorials etc.#, get help on, ask for help on, give help on, teach stuff etc. about Game Maker!!!
Me here is what I know about Game Maker
x- is left
x+ is right
y- is up
y+ is down
ObjCharacter and ObjWall so say you/other(s) want to have left side of wall and top side of wall to be solid. Do this in either collision event or step event:
if ( hspeed> 0 && y < ObjWall.y )
{
other.solid = true;
move_contact_solid(direction,12);
hspeed = 0;
}
if ( vspeed> 0 && y < ObjWall.y )
{
other.solid = true;
move_contact_solid(direction,12);
vspeed = 0;
}
if ( vspeed< 0 && y > ObjWall.y )
{
other.solid = false;
}
if ( hspeed< 0 && y > ObjWall.y )
{
other.solid = false;
}
//first collision on left, next is collision on top, next is
//collision on bottom and finally collision on the right.