Changing the player's hit box

I want to have my player carry something. Is there a way to increase the player's hit box to include the object? Is there a way to make the player's hit box a variable size depending on which direction they are facing?

I’d say this depends on how you’re implementing the carrying in the first place.

There are no hit boxes as such in Pulp; tiles are just adjacent. If you’re trying to make something like the interact event fire when the carried item bumps against something, I’d implement that by checking every time the player moves—see if the attempted move would bump the item into something.

That’s a bit vague, I realize, but it’ll change based on how the item works in your game.

But interact only works for the player right? The player would be carrying an item in front of them, so the item would run onto the wall or solid object first. That's why I want to extend the player "hit box". Would something like mimic work?

Yeah, I was suggesting checking whenever the player moves, or attempts to move—making your own interact event of sorts. So, in the Player's update event, check event.dx and event.dy to see what direction they moved in; then add -1 or +1 (or such) to event.px to check the tile the item would hit if the player moved that way.

Basically, whenever the player tries to move (update event), find the tile in front of the item, and decide if the Player should be allowed to move.

1 Like