[solved] Possible to use mining tool as weapon?

Place to get help with not working mods / modding interface.
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

[solved] Possible to use mining tool as weapon?

Post by aubergine18 »

Is it possible to using mining tool (eg. axe) as a weapon? I'm thinking of early game mod that would add some extra tools, many of which would be useful as early game weapons. As far as I can tell, the mining tools and weapons are separate prototypes, and I can't see any easy way of swapping entities when necessary to allow the tool/weapon to be equipped in either slot.
Last edited by aubergine18 on Thu Sep 22, 2016 1:14 am, edited 1 time in total.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2179
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: Possible to use mining tool as weapon?

Post by Ranakastrasz »

If you have no ammo in your weapon, then in melee range your character will swing his axe when you try to fire, if an enemy is in melee range. Otherwise, I don't think you can.


As for melee weapons, if you make a dummy custom ammo with a few million charges, and a weapon with extremely short range, and hitscan like SMG, then you can simulate a melee weapon.

I have no idea how to do the animation however.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: Possible to use mining tool as weapon?

Post by aubergine18 »

Ah, I had no idea the mining tool would be used as melee weapon if no other weapon/ammo available. With that feature, there's no need for me to do any trickery - which is great news!
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Post Reply

Return to “Modding help”