GameMaker: Studio

GameMaker: Studio

Find, play, and make games easily
Discover, rate, and download the best player-created games made in GameMaker: Studio for free. Or try making your own and share with the community. Click here to learn more.
Dreaguns 8 Oct, 2016 @ 12:20pm
Shrinking after Collision
Hello and thanks for reading. I hope you can help me out.
obj_A is heading towards obj_B for a collision.
I want to make obj_A shrink when is it near obj_B.
< >
Showing 1-1 of 1 comments
melon king 4 8 Oct, 2016 @ 6:08pm 
Near or colliding? Regardless here a clue for what you would use for shrinking:
image_xscale = 0.5;
image_yscale = 0.5;
Play around with these variables, change the values around and you'll get what to do with them. (try image x_scale += 0.1)
As for distance,
point_distance(x,y,x2,y2);
is good for finding distance between 2 points. You can search this function in the gamemaker help for more infomation.
This is all assuming you are using GML code, if you are using the visual editor, you can add a code segment and paste these codes in. They can be used interchangeably!
< >
Showing 1-1 of 1 comments
Per page: 1530 50