jim555511 Posted November 30, 2017 Share Posted November 30, 2017 (edited) Hi! Thanks for the help. So I'm creating a mod in which a message box will come up with a couple of options. Now I need it so that when the player selects one of these options it gives the player an item. How would I do this? Edited November 30, 2017 by jim555511 Link to comment Share on other sites More sharing options...
IsharaMeradin Posted November 30, 2017 Share Posted November 30, 2017 Small example: Scriptname SampleMessageBox extends ObjectReference Message Property MyMessage Auto MiscObject Property Gold01 Auto Actor Property PlayerRef Auto Event OnActivate(akActionRef) If akActionRef == PlayerRef Int iButton = MyMessage.Show() If IButton == 0 PlayerRef.AddItem(Gold01,100) Else Debug.Notification("Sorry, no gold for you!") EndIf EndIf EndEvent Player gets gold if they press the first button. Any other button, they do not get gold. Link to comment Share on other sites More sharing options...
jim555511 Posted November 30, 2017 Author Share Posted November 30, 2017 Small example: Scriptname SampleMessageBox extends ObjectReference Message Property MyMessage Auto MiscObject Property Gold01 Auto Actor Property PlayerRef Auto Event OnActivate(akActionRef) If akActionRef == PlayerRef Int iButton = MyMessage.Show() If IButton == 0 PlayerRef.AddItem(Gold01,100) Else Debug.Notification("Sorry, no gold for you!") EndIf EndIf EndEvent Player gets gold if they press the first button. Any other button, they do not get gold.Thank you so much, that's a lot of help Link to comment Share on other sites More sharing options...
Recommended Posts