• 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!

SOLVED Problems with Place_meeting on 1.4

I'm trying to make my character mount on a horse when I press "K" close to it. The way I would able to do is making another object, the character on the horse, and create it when I press the button, while destroy the char off the horse, and it worked but I'm trying to limitate to just when is coliding with the horse object on the room.

GML:
if keyboard_check_pressed(ord("K")) {

    if place_meeting(x,y,obj_horse); {
    instance_create(obj_char.x + 16,obj_char.y - 48,obj_charonhorse);
    instance_destroy();
    
    }
}
I tried like this but looks like I writte something wrong or something is missing, the game even starts anymore.
The problem is definitely the place_meeting thing because when I take it off it runs again. Can someone help me?
 

chamaeleon

Member
I'm trying to make my character mount on a horse when I press "K" close to it. The way I would able to do is making another object, the character on the horse, and create it when I press the button, while destroy the char off the horse, and it worked but I'm trying to limitate to just when is coliding with the horse object on the room.

GML:
if keyboard_check_pressed(ord("K")) {

    if place_meeting(x,y,obj_horse); {
    instance_create(obj_char.x + 16,obj_char.y - 48,obj_charonhorse);
    instance_destroy();
   
    }
}
I tried like this but looks like I writte something wrong or something is missing, the game even starts anymore.
The problem is definitely the place_meeting thing because when I take it off it runs again. Can someone help me?
First thing that jumps out at me is a spurious semicolon after the place_meeting() call which does not belong there.
 
Top