Picking up with tents where I left off with shelves. There are currently 2 tent objects in Arma 3, the dome one and the A shape one, but only A shape allows to peek inside, just like in DayZ Mod (don’t think there are tents in DayZ SA yet). So I thought to myself why not make stored items literally appear inside the tent so you could see what is in what tent without the need to go into inventory UI. Now look at the picture and tell me is this cool or is this cool?
The concept is simple, put standard weaponholder inside the tent and add some extra interaction logic. The code is also pretty simple, add gear key event handler and divert inventory interaction to the weaponholder inside the tent. The only minor problem with this set up is that weaponholder changes items around as you add or remove them, so occasionally some items appear outside of the tent, but this is not tragic.
To create a sample tent:
To add event handler:
The above script will only fire when inventory key is pressed. If there is a tent in front of you, inventory will hook to tent’s weaponholder, otherwise it will act normally. Another thing is, even with 2 items setup instead of one (tent and weaponholder), it could be easily converted for use with database and maybe optional even handler added to delete weaponholder if tent is destroyed. This is how it all looks in action: