0
Answered

Quick weapon change from inventory slot

Петр Барышевский 2 weeks ago in Shooter updated by Marti (Lead Developer) 1 week ago 3

Hi developers, you are geniuses! Thank you for the wonderful product, but I have one question. The situation is this: I created another slot for weapons. And that, I have the first slot for the machine gun, the second slot for the pistol. Wearable weapons without any problems. But then I posed the question of a quick change of weapons on the buttons 1,2,3, etc. .... How do I let GC understand what I want from it? And I want that when you click on the number 1 - get the weapon from the first slot, and by clicking on the number 2 - get from the second slot. Can you help? If this functionality is not yet available, tell me when to expect a new version of Inventory or Shooter with this functionality?

Unity version:
2018
Game Creator version:
1.0.7
Answered

Hi! 

This is very interesting. Some users have expressed their desire to have some sort of hot-bar where you can drag items and bind them to be equipped/used when the button assigned to them is pressed. It's something we'd like to explore in the future.

Meanwhile, if your slots are fixed (Slot 1 will always contain a pistol, Slot 2 a machinegun, ...) you can create as many Triggers as slots you have. Each of them should be bound to a key. For example, the Trigger for equipping Slot 1, should be a Trigger "On Key Down" with the option "Num 1", which should call the Action "Equip Weapon" that references the Pistol weapon.

If your slot system is dynamic... I'm afraid it wouldn't be possible to do now (without having a lot of elaborate Triggers). Sorry if that's the case.

Despite this, we're taking note :-)

+1

I created a trigger for a button 1 that looks into variable M16equiped. if it`s equiped - draw it.

if slot is empty - M16equiped is null. For now for every weapon I made a variables.

In that way I can have more weapon in my inventory and trigger bool variable on equip action:)

Thanks,

Excellent! You're welcome!