Difference between revisions of "Complete Example Scripts"

Jump to navigation Jump to search
253 bytes removed ,  20:52, 19 June 2015
imported>SarthesArai
imported>Langerz82
Line 767: Line 767:
Say you have a door or treasure chest you want to have a timed lock on it, here you can. You can also send a Message to the users when it Enables/Disables. Similar to above. You could use it for a template for a variety of things not just a lock Mechanism, however this is a straight-forward basic example.
Say you have a door or treasure chest you want to have a timed lock on it, here you can. You can also send a Message to the users when it Enables/Disables. Similar to above. You could use it for a template for a variety of things not just a lock Mechanism, however this is a straight-forward basic example.


'''To make this work''':  Download and copy the [https://gist.github.com/Langerz82/bfe7ddf921b1ebc00ad4 TimedObjRef.psc] file to your Skyrim/Data folder.
'''To make this work''':  Download and copy the [https://gist.github.com/Langerz82/976c172ce04f074bea91 TimedObjRef2.psc] file to your Skyrim/Data folder.
The following is an example of the script in action.
The following is an example of the script in action.


<source lang="papyrus">ScriptName jlTimedLock2 extends TimedObjRef
<source lang="papyrus">ScriptName jlTimedLock2 extends TimedObjRef2


String Property sEnabledMessage Auto ; Optional Message when enabled.
String Property sEnabledMessage Auto ; Optional Message when enabled.
Line 805: Line 805:


For more examples like this see [http://www.creationkit.com/Using_Activated_Object_Reference Using Activated Object Reference] for advanced functionality.
For more examples like this see [http://www.creationkit.com/Using_Activated_Object_Reference Using Activated Object Reference] for advanced functionality.
There is another version that is meant to do the same thing except it uses game time instead of polling which is allot more accurate and efficient. See [https://gist.github.com/Langerz82/976c172ce04f074bea91 Timed Object Reference 2 Alpha (Known Bugs)].


= Adding a spell when you shout =
= Adding a spell when you shout =
Anonymous user

Navigation menu