Jump to content

[LE] Message box help


jim555511

Recommended Posts

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 by jim555511
Link to comment
Share on other sites

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...