GetUseSound- Potion

From the CreationKit Wiki
Revision as of 16:17, 7 May 2015 by imported>Kerberus14 (Created page with "Script example of debugging GetUseSound(): File:http://puu.sh/hFanV/5ef356185f.png The FormList we're using has "NPCHumanEatSoup", "ITMPotionUse" and "ITMFoodEat". "NPCHu...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Script example of debugging GetUseSound():

File:Http://puu.sh/hFanV/5ef356185f.png The FormList we're using has "NPCHumanEatSoup", "ITMPotionUse" and "ITMFoodEat". "NPCHumanEatSoup" is playing when the player eats a stew or soup item. "ITMPotionUse" is playing when the player drinks a potion or any liquid item such as ale or wine. "ITMFoodEat" is playing when the player eats any meat items similar to chicken breast, dog meat or horse meat.


Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference)

FoodIs = akBaseObject as Potion Int Index = FoodFormList.GetSize() IsMeat=0 IsLiquid=0 IsSoup=0 While Index Index-=1 if FoodIs.GetUseSound()==FoodFormList.GetAt(2) && IsMeat!=1 Debug.Messagebox("IsMeat") IsMeat=1 elseif FoodIs.GetUseSound()==FoodFormList.GetAt(1) && IsLiquid!=1 Debug.Messagebox("IsLiquid") IsLiquid=1 elseif FoodIs.GetUseSound()==FoodFormList.GetAt(0) && IsSoup!=1 IsSoup=1 Debug.Messagebox("IsSoup") endif endwhile