Aller au contenu

Photo

Making an invetory object make sound ("music box")


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
Alice24

Alice24
  • Members
  • 19 messages

Hi guys. I added a music file to my hakpak that I want to be played every time the user activates a certain item (a music box). But when I try to edit the item, I don't see any place where I can add a script for that. Can you help me figure out how to do it?



#2
Proleric

Proleric
  • Members
  • 2 354 messages
One way to do this is to add "Cast Spell : Unique Power Self Only" to the item's Properties tab. Then, when the item is used, it will trigger the module's OnActivateItem script. GetItemActivated() will return the item that was used. A minor downside is that the PC will do a spellcasting animation.

#3
Pstemarie

Pstemarie
  • Members
  • 2 745 messages

If I remember correctly, if you clone the unique power line in spells.2da, remove the animation references, and link the new line through iprp.spells.2da (may have the wrong 2da), the PC won't do the animation sequence.


  • Zwerkules et 3RavensMore aiment ceci