Complete Example Scripts: Difference between revisions
Jump to navigation
Jump to search
→A Fully Functional Dwemer Button: Made capitalisation more consistent, and changed event parameter names to be in line with documentation. Also removed unneeded code handling "Self"
imported>Cipscis (→A Trigger To Activate When Player Walks Through It: Updated capitalisation and parameter names to make the more in line with documentation) |
imported>Cipscis (→A Fully Functional Dwemer Button: Made capitalisation more consistent, and changed event parameter names to be in line with documentation. Also removed unneeded code handling "Self") |
||
| Line 58: | Line 58: | ||
Scriptname DwemerButtonExampleScript extends ObjectReference | Scriptname DwemerButtonExampleScript extends ObjectReference | ||
ObjectReference property objSelf auto hidden | |||
Sound property QSTAstrolabeButtonPressX auto | |||
;================== | ;================== | ||
| Line 66: | Line 66: | ||
;this scripted object | ;this scripted object | ||
Event OnCellAttach() | |||
PlayAnimation("Open") | |||
EndEvent | |||
;================== | ;================== | ||
Event OnActivate(ObjectReference akActionRef) | |||
if (akActionRef == Game.GetPlayer()) | |||
;--- sound and animation | |||
PlayAnimationAndWait("Trigger01", "done") | |||
if (QSTAstrolabeButtonPressX) | |||
QSTAstrolabeButtonPressX.Play(Self) | |||
endif | |||
;actual code for what button should do | |||
Debug.MessageBox("Joy!") | |||
endif | |||
EndEvent | |||
</source> | </source> | ||