Uploaded September 2011 | Updated September 2026, 2 weeks ago
A tutorial on how to pickup and carry/throw objects in Game maker. This tutorial is intended for platform games.
Codes:
if place_meeting(x,y,obj_pickup2) //check if we're touching the pickup
{
var ID;
ID=instance_nearest(x,y,obj_pickup2); //if we are get it's ID. This allows us to have numourus
ID.stick=true; // pickups and be able to pick up the right one
}//Set stick to true, which makes obj_pickup2 stick to the player
if place_meeting(x,y,obj_pickup2) //Same as press "a"
{
var ID;
ID=instance_nearest(x,y,obj_pickup2);
ID.stick=false;
ID.speed=6; //change the speed to change how the pickup gets thrown
if right=true
ID.direction=50; //the direction in which the pickup is thrown
else
ID.direction=130;
}
solid = false;
gravity=0.2; //this is the gravity. Is the same as "Set gravity" D&D (drag and drop)
gravity_direction=270; //if you change the "gravity=0.2;", then you'll need to change all
//the things that have a *** to the new gravity
stick=false; //our variable which will control when the object stick to the player
if stick = true //if we're meant to be stick to the player...
{
x=obj_player.x; //stick to the player
y=obj_player.y;
gravity=0;
other.solid = false;
}
else
gravity=0.2; //else we set the gravity.
if stick = false // if we're not meant to be sticking to the player.
{ //If we didn't have that, all hell would break lose.
move_contact_solid(270,12); //Move to contact in GML form
speed=0; //Vertical and Horizontal speed to 0
}
And here's the link to that test video I was talking about: youtube.com/watch?v=E2-pnDfjSCU&feature=channel_video_title
A tutorial on how to pickup and carry/throw objects in Game maker. This tutorial is intended for platform games.
Codes:
if place_meeting(x,y,obj_pickup2) //check if we're touching the pickup
{
var ID;
ID=instance_nearest(x,y,obj_pickup2); //if we are get it's ID. This allows us to have numourus
ID.stick=true; // pickups and be able to pick up the right one
}//Set stick to true, which makes obj_pickup2 stick to the player
if place_meeting(x,y,obj_pickup2) //Same as press "a"
{
var ID;
ID=instance_nearest(x,y,obj_pickup2);
ID.stick=false;
ID.speed=6; //change the speed to change how the pickup gets thrown
if right=true
ID.direction=50; //the direction in which the pickup is thrown
else
ID.direction=130;
}
solid = false;
gravity=0.2; //this is the gravity. Is the same as "Set gravity" D&D (drag and drop)
gravity_direction=270; //if you change the "gravity=0.2;", then you'll need to change all
//the things that have a *** to the new gravity
stick=false; //our variable which will control when the object stick to the player
if stick = true //if we're meant to be stick to the player...
{
x=obj_player.x; //stick to the player
y=obj_player.y;
gravity=0;
other.solid = false;
}
else
gravity=0.2; //else we set the gravity.
if stick = false // if we're not meant to be sticking to the player.
{ //If we didn't have that, all hell would break lose.
move_contact_solid(270,12); //Move to contact in GML form
speed=0; //Vertical and Horizontal speed to 0
}
And here's the link to that test video I was talking about: youtube.com/watch?v=E2-pnDfjSCU&feature=channel_video_title





![Rexplays: Crystal Universe Aftermath - [10/11]
Hey everyone, how it goin? Welcome to part 8 of my brand new Lets pla...or should I say, Rexplay series of Crystal Universe Aftermath! In this episode we Explore around a bit in the crystal realm and come in contact with a terrifying new foe, will we survive? Find out, on this episode of rexplay Crystal Universe Aftermath! ^)^
Link to download game: http://sandbox.yoyogames.com/games/79955 Rexplays: Crystal Universe Aftermath - [10/11]](https://i.ytimg.com/vi/Yob0GlMEt-A/mqdefault.jpg)



![Game Maker Controlled Parallax Scrolling Tutorial
In this tutorial Ill be showing how to add in controlled parallax scrolling into your games, sort of how you see in some of the Sonic or Mario games, enjoy ^)^
Codes used in tutorial:
Background_controller object Step Event:
background_x[0] = view_xview[0] * 0.6
background_x[1] = view_xview[0] * 0.4
Link to dl example:
https://www.dropbox.com/s/mhobljcpwfgtthh/parallax_example_rexfurry.gmk Game Maker Controlled Parallax Scrolling Tutorial](https://i.ytimg.com/vi/_MqcjiDOpYQ/mqdefault.jpg)
