I need some help plz
how can I attach a custom sound to a custom weapon?
it's a modified weapon of the venom edge, but I would like that every time It shots, it plays a custom sound
I have tried onUse command , but it doesnt work
Code: Select all
onUse = function()
playSound("uraniumgun")
end,Code: Select all
defineObject{
name = "uranium_gun",
class = "Item",
uiName = "Uranium Canon",
model = "assets/models/items/machine_part/machine_part_south.fbx",
gfxIndex = 99,
description = "Unknown weapon. One trigger on one extremity, two pipes on the other",
-- skill = "missile_weapons",
-- requiredLevel = 0,
attackPower = 100,
coolDownTime = 0.5,
attackMethod = "castWandSpell",
spell = "poison_bolt",
wandPower = 150,
charges = 5,
-- attackMethod = "rangedAttack",
-- attackSound = "uraniumgun",
-- rangedWeapon = true,
-- ammo = "uranium_bullet",
impactSound = "impact_blade",
weight = 2.0,
emptyItem = "damaged_uranium_gun",
onUse = function()
playSound("uraniumgun")
end,
}Any idea?