How to make a weapon swap system like in ballistic?

That would be a hassle to do, you’d need to implement your own on ground item model, because when picked up, the weapon will replace the currently held weapon

Which means you’d need to keep an array of all currently held weapons to see if it triggered a wrong category weapon drop and place the weapon back into the inventory while removing the other category weapon

Example:

  • Player has AR1 / SMG1 / SG1
  • Save that array on a loop using conditional buttons
  • Player picks up AR2 while holding SMG1
  • You would need the dropped AR2 to be coming from an item spawner so that you can use the ItemPickedUpEvent()
  • When picked up, detect that the player actually lost its SMG
  • Because player has now two AR, you need to drop the AR1 using an item remover
  • Place the SMG1 back into inventory

And I’m not sure if it’s even safe to do, it means you’d need to drop the weapons yourself upon death because you need item spawners to drop them, also not sure how it would behave in terms of which item will be equipped at the end of the process

There’s probably another way using a custom script but I’m really lazy to think about it rn, it seems like a bad idea to me

1 Like