Jiddle Posted February 29, 2012 Share Posted February 29, 2012 Okay, so I added an activator(Red box) to my cell. I want it to do so that if the player walks into the red box, he will get 1 gold and a sound will play.So I added a new script to the activator, and wrote this: Scriptname MyScript extends ObjectReference event OnTriggerEnter(objectReference akActionRef) Game.GetPlayer().AddItem(Gold001, 1) ; Add one gold to the Player MySound.Play(Self) ; Play the sound endEvent Sound Property MySound Auto But when I tried it in-game, nothing happened when I walked into it the first time, but after that the sound played every time I did. But I never got any coins!I went like Whaaaat? :wacko: So I started to look for where I had made a mistake. Here is the mindf***: If I remove the MySound.Play line from the script, the sound still plays! But if I remove the script from the activator, it does not play.I have no clue what to do, and what is causing this.. Anyone know what may be the problem? Link to comment Share on other sites More sharing options...
Cipscis Posted February 29, 2012 Share Posted February 29, 2012 Make sure the latest version of your script is compiled, and you need to use a property in order to add gold to the player's inventory. See "EditorIDs in Papyrus" for more details on that. You'll probably also want to include a conditional statement in your script so the event body only runs when the player is your akActionRef. Cipscis Link to comment Share on other sites More sharing options...
Recommended Posts