Jump to content

Sit Trigger or Script


daisy8

Recommended Posts

Hi everybody

 

I am attempting to activate a secret Nor door when the player sits down on a Nor Bench. I have been able to get it working with a simple trigger box but it activates the door whenever the player sits OR stands on the bench. I want to check to make sure the player is sitting on the chair before openning the door.

 

I have been modding for a while now but am still not able to fully get a handle on Papyrus. Frustrating.

 

Thanks guys

Daisy

Link to comment
Share on other sites

Hi everybody

 

I am attempting to activate a secret Nor door when the player sits down on a Nor Bench. I have been able to get it working with a simple trigger box but it activates the door whenever the player sits OR stands on the bench. I want to check to make sure the player is sitting on the chair before openning the door.

 

I have been modding for a while now but am still not able to fully get a handle on Papyrus. Frustrating.

 

Thanks guys

Daisy

What if you attached a script to the bench in the CK?

Scriptname TheBench extends ObjectReference
Event OnActivate(ObjectReference akActionRef)
debug.Notification("Get off of me you... " +  akActionRef)
;Do the stuff here to activate teh door.
EndEvent

Link to comment
Share on other sites

Hey Plast, thanks !

 

This code worked great ! Also had to stop it closing when the player stands up. Unchecking respawns on the bench meant that a re-load doesn't reset the states

 

Thanks.

 

Scriptname ADZSitChairActivateREFScript extends ObjectReference  
keyword property linkKeyword auto

auto State notdone

Event OnActivate(ObjectReference akActionRef)

debug.Notification("Get off of me you... " + akActionRef)

(getLinkedRef(linkKeyword) as objectReference).activate(self)

gotostate ("done")

EndEvent

Endstate



State done

Endstate

Link to comment
Share on other sites

  • Recently Browsing   0 members

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