Jump to content

Recommended Posts

Posted

Is there a simple way to create a pop-up box that tells you found a certain item? Example: "You just found Grimsever, Rejoice!"

Also, so it only pops up the first time you pick it up. Thanks in advance

Posted (edited)

Hey, yes you can use a script messagebox. Make a new quest, then make a new reference alias on said quest pointing at the player. Choose Specific Reference, Cell Any, Player.

 

Then put this script on the reference alias:

Scriptname DetectGrimsever extends ReferenceAlias 

Weapon Property FFRiften09Grimsever Auto

Event OnInit() 
    AddInventoryEventFilter(FFRiften09Grimsever)
EndEvent 

Event OnItemAdded(Form akBaseItem, Int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)
    If akBaseItem == FFRiften09Grimsever
        Debug.MessageBox("You just found Grimsever, Rejoice!")
        Utility.Wait(1) 
        Self.GetOwningQuest().Stop() ;stops the quest this alias is on
    Endif 
EndEvent
Name the script something more unique, and don't forget to fill properties in the Creation Kit after compiling it.
If you want to do this for more than one item, the script would need to be a little more complex.
Edited by dylbill
Posted

It wouldn't have to be much more complex for multiple items.

 

Create a quest which will be used to manage the system. This quest will be start game enabled and run once. Apply a script to this quest which will start all the individual quests each outlined as above but with a different object.

 

Management quest script could be as follows:

 

  Reveal hidden contents

 

 

Modifying dylbill's script a bit to make it more generic so that it can be reused as many times as necessary

  Reveal hidden contents

 

Posted (edited)

I was thinking of doing it all with one script / alias. I'm not sure if having a bunch of quests running at once is bad for performance or not, but it does make me wary. Instead you could put all items you want messages for in a formlist, and use a string array for the messages:

 

 

  Reveal hidden contents

Edited by dylbill
Posted

There are always multiple ways of approaching the same thing. Each can be tested for performance if necessary.

 

Another method:

A single quest where each target item is placed in its own alias. The quest would have objectives to find each of the items. Objective text can be displayed on screen when each object is found. Once all objects are found, shut the quest down. Very minimal scripting.

  • Recently Browsing   0 members

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