How to replicate Payday's Loot Bag System.

Greetings All,

I’m wanting to figure out how to go about implementing the Loot Bag mechanics from Payday 2/3. In the either game there are objects that spawn on the maps that a player must get close enough to in order to interact with and then the object gets turned into a duffel bag that attaches to their back. The HUD updates with information telling the player what item they are carrying, along with their camera tilting to the left (indicating they are carrying something), and depending on what type of item they are carrying their movement speed might lower and they won’t be able to sprint. Also, when the player no longer wishes to carry said item they press a certain key and the bag gets launched from their character (like they are throwing it, in an arch) ready to be picked up off the ground by them or another connected player.

There is a lot going on with this question, but if anyone has any ideas on how to implement this I would appreciate the help. I already have an idea on how to implement the picking up and throwing of said object, but the other stuff I’m finding it hard to come across any tutorials or similar questions being answered on the forums.

Hello there,

  1. Make a base actor as LootBase
  2. Inside put a static mesh
  3. Put a sphere collider adjust its size
  4. Create a bool variable as bIsPicked. Default false
  5. Create a float variable as weight
  6. On Begin play set weight random in range float 50-100.
  7. Select collider and on details click OnComponentOverlapBegin click plus it will create an event on graph
  8. On component overlap, get overlapping actor cast to playercharacter.
  9. Optional : you can create widget diplay press E over here. If you do that wait for key event in graph.
  10. From is valid create a node with attach actor to actor.
  11. With attach actor to actor node. attach bag to player. You can specify a socket if you create on your characters skeletal mesh. Like shoulder socket etc. Now you looted object.
  12. If you want to decrease speed. Get loot object and its weight variable we created. Get a percentage from player movement component → max walking speed, and decrease from that.
  13. Now you have a loot + your character moves slowly depending on weight.
  14. If you press (E) assuming, you can drop item simply by detaching actor.
  15. But if you want to have a simple throwing move, then after pressing E detach actor(bag). Set Location infront of camera, enable physics on skeletal mesh and add impulse force with direction of camera forward vector.

First start from somewhere by creating the base bag, you get stuck ask on this forum. We help.

Don’t want to directly show you since it won’t help you in a good way. Start doing some steps then ask here.

2 Likes