Spidertron Weapon Switcher


Allows the Spidertron to fire any type of weapon by cycling through different loadouts with Control + Tab.

Content
10 months ago
1.0 - 1.1
5.06K
Combat

g [Completed] 4 gun slots?

3 years ago

I've looked through the source code, wondering how you have 4 gun slots appearing in the bottom-right corner of the screen. Could you shed some light on how this is accomplished in the code?

3 years ago
(updated 3 years ago)

Sure, it is very simple: each of the weapon options is its own prototype, and any prototype can be given a list of guns. If you give the same gun more than once, then you get multiple of the same gun. I do this in prototypes/spidertron.lua: https://github.com/tburrows13/SpidertronWeaponSwitcher/blob/master/prototypes/spidertron.lua#L8. The guns have to be either part of the base game or created by you. I create 3 custom guns in prototypes/gun.lua.

Let me know if you have more questions :)

3 years ago

Thank you for the quick response!

New response