Difference between revisions of "Scripting tutorial lever"

9 bytes removed ,  20:41, 15 March 2012
imported>Fg109
imported>Fg109
Line 219: Line 219:
And now we have come to the final part of our script, the [[OnActivate_-_ObjectReference|OnActivate]] event.  This event is received when someone tries to activate our lever.
And now we have come to the final part of our script, the [[OnActivate_-_ObjectReference|OnActivate]] event.  This event is received when someone tries to activate our lever.


You might be wondering what are these states that you see.  I'm not sure I can accurately describe them, so it's probably best to check the [[http://www.creationkit.com/States_%28Papyrus%29|States]] page.  Simply put, all scripts/objects have a state.  If there are no states defined in the script, then the object is in the "null" state.
You might be wondering what are these states that you see.  I'm not sure I can accurately describe them, so it's probably best to check the [[States_%28Papyrus%29|States]] page.  Simply put, all scripts/objects have a state.  If there are no states defined in the script, then the object is in the "null" state.


In our script, we had
In our script, we had
Line 267: Line 267:


is telling our script to stop processing anything for 1 second (in order to let the animations play out) and then go back to the "Inactive" state (so that activating the lever again will do something).
is telling our script to stop processing anything for 1 second (in order to let the animations play out) and then go back to the "Inactive" state (so that activating the lever again will do something).
===Conclusion===


So put all that together, and your script should look something like this:
So put all that together, and your script should look something like this:
Anonymous user