onPickItem with sound help
Posted: Mon Sep 16, 2013 4:27 am
Hi all.. I have notice that when you pick up EG: Golden_Orb it plays a sound, not Consume or OnUseItem, but I assume onPickUp..I have searched the Assetsv2 and cant find the function..
So I guess its built into the main code (engine) This is my object below, the player can pick it up but the Sound does not play don't know why??
defineObject{
name = "undead2",
baseObject = "scroll",
uiName = "Book Of The Undead Volume 2",
class = "Item",
model = "assets/models/items/tome.fbx",
gfxIndex = 30,
scroll = true,
weight = 0.3,
onPickUpItem = function(self, champion) ---- This what I added from the Script Reference TXT ----
playSound("level_up")
return true
end,
description = "This book has blood stains on it and radiates with Evil",
}
Any help and THXS....
So I guess its built into the main code (engine) This is my object below, the player can pick it up but the Sound does not play don't know why??
defineObject{
name = "undead2",
baseObject = "scroll",
uiName = "Book Of The Undead Volume 2",
class = "Item",
model = "assets/models/items/tome.fbx",
gfxIndex = 30,
scroll = true,
weight = 0.3,
onPickUpItem = function(self, champion) ---- This what I added from the Script Reference TXT ----
playSound("level_up")
return true
end,
description = "This book has blood stains on it and radiates with Evil",
}
Any help and THXS....