Complete Example Scripts: Difference between revisions
Jump to navigation
Jump to search
m
→A Fully Functional Dwemer Button: GetPlayer swapped for PlayerREF | Removed extraneous/unused ObjSelf property
imported>JustinOther m (→Move an Object to a Specific Location Without Fade: GetPlayer swapped for PlayerREF) |
imported>JustinOther m (→A Fully Functional Dwemer Button: GetPlayer swapped for PlayerREF | Removed extraneous/unused ObjSelf property) |
||
| Line 228: | Line 228: | ||
<source lang="papyrus">Scriptname DwemerButtonExampleScript extends ObjectReference | <source lang="papyrus">Scriptname DwemerButtonExampleScript extends ObjectReference | ||
Actor Property PlayerREF Auto | |||
Sound | Sound Property QSTAstrolabeButtonPressX Auto | ||
Event OnCellAttach() ; this event runs when cell is loaded containing this scripted object | Event OnCellAttach() ; this event runs when cell is loaded containing this scripted object | ||
| Line 236: | Line 236: | ||
Event OnActivate(ObjectReference akActionRef) | Event OnActivate(ObjectReference akActionRef) | ||
If akActionRef == PlayerREF | |||
PlayAnimationAndWait("Trigger01", "done") ; | PlayAnimationAndWait("Trigger01", "done") ; sound and animation | ||
If QSTAstrolabeButtonPressX | |||
QSTAstrolabeButtonPressX.Play(Self) | QSTAstrolabeButtonPressX.Play(Self) | ||
EndIf | |||
Debug.MessageBox("Joy!") ;actual code for what button should do | Debug.MessageBox("Joy!") ; actual code for what button should do | ||
EndIf | |||
EndEvent</source> | EndEvent</source> | ||