Hi, I am new to the forum. I decided to come here because I'm not getting and replies at the yoyogames forum. On my game on Gamemaker Pro, if you spam right click (which creates a path) the game will crash. Here's my code for the player object under "glob right press" event which creates the path etc:
if(instance_exists(target_obj)) {
with (target_obj) instance_destroy();
path_clear_points(path); //using this code and the one below, I thought it would solve memory problems arrrggg...
path_delete(path);
}
if(place_free(mouse_x,mouse_y)){
target = instance_create(mouse_x, mouse_y, target_obj);
}
if (instance_exists(target_obj)){
path = path_add();
mp_potential_path_object(path, target_obj.x, target_obj.y, 1, 100, wall_obj);
path_start(path, 5, 0, 0);
}
Anyone, any ideas? I'm really stuck... and it would be sad to abandon it cause I worked for so long. ![]()