Jump to content

Having some trouble with a tigger script


NikaCola

Recommended Posts

What I'd like to do is have the player place a book on a shelf, and have that update a quest stage. Here is the script I have so far, and it's just not working. (though I know the trigger is activating as I added a debug message just to be sure I had actually entered it, etc.)

Scriptname mytriggerscript extends ObjectReference

Quest Property myquest Auto

MiscObject Property mybook Auto




Event OnTriggerEnter(ObjectReference akActionRef)
       if akActionRef.getBaseObject() == mybook
             if myquest.getstage() == 10
                    myquest.setstage(100)
             endif
    endif
EndEvent

I can do this successfully by making the bookshelf a container and putting this script onto that:

Scriptname bookshelfscript extends ObjectReference Const

Quest Property myquest Auto Const

MiscObject Property mybook Auto Const

Event onInit()
       AddInventoryEventFilter(mybook)
endevent

Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)
       if akBaseItem == mybook
             if myquest.getstage() == 10
                    myquest.setstage(100)
                    RemoveAllInventoryEventFilters()
             endif
       endif
EndEvent

But I'd really like to use the "pick up book and drop it here" method instead of placing it "inside" the bookshelf if at all possible.

 

Thank you so much for any and all help! <3

 

edit: LOL that should be TRIGGER script. A Tigger script would be even sillier XD

Link to comment
Share on other sites

  • Recently Browsing   0 members

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