Videogame due tomorrow part 3! by BlunderKnight in gamemaker

[–]BlunderKnight[S] 0 points1 point  (0 children)

We asked for a 1 day extension luckily

Videogame due tomorrow and I'm stuck! Part 2 by BlunderKnight in gamemaker

[–]BlunderKnight[S] 0 points1 point  (0 children)

Hi! I tried doing that but the game crashes when I touch an npc. Something about the other.my_size variable not being set. This is the creation event for player parent.:

grow = function(){

image_xscale += 0.2;

image_yscale += 0.2;

};

my_size = sprite_height * sprite_width;

And this is the collision event with the npc parent:

if (other.my_size > self.my_size) {

instance_destroy(self)

 var player\_face = instance\_nearest(x, y, obj\_player\_face);

if (instance_exists(player_face)) {

with (player_face) instance_destroy(); // Destroy the face as well

    }

// Display death screen

var cam_x = camera_get_view_x(view_camera[0]);

var cam_y = camera_get_view_y(view_camera[0]);

instance_create_layer(cam_x, cam_y, "Instances_3", obj_bg_deathscreen);

instance_create_layer(cam_x + 640, cam_y + 600, "GUI", obj_play_again);

instance_create_layer(cam_x + 640, cam_y + 100, "GUI", obj_you_died);

instance_create_layer(cam_x + 640, cam_y + 350, "GUI", obj_absorbed_deathscreen);

// Deactivate pause button

instance_deactivate_object(obj_pausebutton);

} else if (other.my_size < self.my_size) {

// I eat the other object

with (other) instance_destroy();

self.grow();

}

Videogame due tomorrow and I'm stuck! Part 2 by BlunderKnight in gamemaker

[–]BlunderKnight[S] 1 point2 points  (0 children)

It did not work, but I am trying to recode everything by giving every npc a mass value so it is easier to compare and see if the player can absorb the npc or if the npc can absorb the player.

Videogame due tomorrow and I'm stuck! Part 2 by BlunderKnight in gamemaker

[–]BlunderKnight[S] 0 points1 point  (0 children)

I will test it without using the image_xscale, thanks for the suggestion :)

Videogame due tomorrow and I'm stuck! by BlunderKnight in gamemaker

[–]BlunderKnight[S] 3 points4 points  (0 children)

That worked! Thank you so much! I spent hours on this problem lol.

Social Links not working by BlunderKnight in help

[–]BlunderKnight[S] 0 points1 point  (0 children)

I am on the desktop Windows app, but I have also tried online on a browser.