esthermoon Posted October 3, 2009 Share Posted October 3, 2009 Like I said, this is really simple. I'm pretty new to scripting, and haven't done too much writing code in the past either.Anyway, my script was to use an Activator (In this case, a rock) and have it pop up with a MessageBox Telling me something, and giving me only one option of replying (In this case "<Take the arrow>"), and then add a particular arrow to my inventory. I made the arrow, and it works fine. My only issue is the whole 'Give the arrow' part. What's the command to do that?I want to click "<Take the arrow>" and get one arrow. Nothing else special. I was pretty sure it'd be something along the lines of the "player.additem <itemcode>" but it's not making itself obvious. I'm certain that most of you know how to do this, so thanks for any help. :) My current script looks like this:ScriptName ParagonArrow Short button Begin OnActivate MessageBox "The Paragon grants you one arrow.", "<Take the arrow>" Set button to GetButtonPressed If ( button == 0 ) //This is where I'm stuck// Return End Again, I'm pretty new to this, I'd appreciate anyone pointing out anything I'm doing wrong. ;) EDIT: I've sussed that it's something to do with IsActionRef player.I'm going to keep fiddling, I'll mention if I get it to work :) Link to comment Share on other sites More sharing options...
Pronam Posted October 3, 2009 Share Posted October 3, 2009 Yes it is, just use AddItemso: player.additem yourrarow 1In CS, you can just use the editor-name you gave to it. (Although you can still use the form-id too.)Just don't forget to disable the arrow in the rock! (if it was stuck in it...) Link to comment Share on other sites More sharing options...
esthermoon Posted October 3, 2009 Author Share Posted October 3, 2009 Don't worry, I've got it to work now. Well, it lets me save at least.ScriptName ParagonArrow Begin OnActivate if IsActionRef player == 1 player.additem 01000ed6 1 Message "The Paragon grants you one arrow." endif End EDIT: Doesn't work. Doesn't give me an arrow, and the message doesn't come up..Any ideas? EDIT2: Got it.Works. Don't worry. :DDD Link to comment Share on other sites More sharing options...
Recommended Posts