Open main menu
Home
Random
Log in
Settings
About the CreationKit Wiki
Disclaimers
the CreationKit Wiki
Search
Editing
Complete Example Scripts
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=A Fully Functional Dwemer Button= <syntaxhighlight lang="papyrus">Scriptname DwemerButtonExampleScript extends ObjectReference Actor Property PlayerREF Auto Sound Property QSTAstrolabeButtonPressX Auto Event OnCellAttach() ; this event runs when cell is loaded containing this scripted object PlayAnimation("Open") EndEvent Event OnActivate(ObjectReference akActionRef) If akActionRef == PlayerREF PlayAnimationAndWait("Trigger01", "done") ; sound and animation If QSTAstrolabeButtonPressX QSTAstrolabeButtonPressX.Play(Self) EndIf Debug.MessageBox("Joy!") ; actual code for what button should do EndIf EndEvent</syntaxhighlight> '''To Make This Script Work''' * You must create this script on an Activator object, probably a dwemer button :) * You must then set the property for the QST sound effect property, the sound file has the same name as the property in the script above. '''To make your own dwemer button and avoid messing with the original Skyrim scripts/activators:''' * Find a dwemer button in the object window and change the ID. * Create the changed button as a new form when prompted. * Edit the new button to remove the original script(s) and attach you own.
Summary:
Please note that all contributions to the CreationKit Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see
CreationKit:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)