Do I use "ItemComponent:setSecondaryAction()" inside the script for the gun somewhere or in the dungeon as a script somewhere?
Code: Select all
defineObject{
name = "revolver",
baseObject = "base_item",
components = {
{
class = "Model",
model = "assets/models/items/revolver.fbx",
},
{
class = "Item",
uiName = "Dragonbreath Revolver",
description = "Powerful runes and enchantments are inscribed upon this weapon to keep its intricate mechanisms working.",
gfxIndex = 332,
gfxIndexPowerAttack = 417,
impactSound = "impact_blunt",
secondaryAction = "reload",
weight = 1.5,
traits = { "firearm" },
},
{
class = "FirearmAttack",
attackPower = 22,
cooldown = 1.5,
attackSound = "gun_shot_small",
ammo = "pellet",
clipSize = 6,
jamChance = 12,
requirements = { "firearms", 3 },
},
{
class = "ReloadFirearm",
uiName = "Reload",
name = "reload",
requirements = { "firearms", 3 },
gameEffect = "Reloads all six chambers of the revolver."
},
{
class = "CastSpell",
name = "fireball",
uiName = "Fireball",
cooldown = 5,
spell = "fireball",
energyCost = 25,
power = 4,
charges = 9,
fullGfxIndex = 215,
emptyGfxIndex = 216,
requirements = { "concentration", 1 },
},
},
}
Thats what I have down at the moment my guess is its loaded with errors xD..