Is there a way to make a character carry an item in a platform game?

I want the character to be able to pick up something and then take it to a different point in the game. What would be best way be to make it look like the character is carrying something?

Set a variable to the object you want to carry like obj_var_picked, then when your player is in collision with the object and a button is pressed like “Up arrow” check if the object variable is 0 so can be picked change the variable to 1 and set an action to check

obj_var_picked = 1
player is in collision with object
Change the object position x to player.x
Cange the object position y to player y -16

Note: the -16 is in my case a half of the player height

This way the object always will follow your player.
So if you want to drop it add some event like if “Down key” pressed and object is in collision with player and object variable = 1
Do drop stuff…
Here my events


Thank you! This is so helpful. :smile:

1 Like