Difference between revisions of "Scripting Tutorial: My First Script"

Byline removed
imported>Tyrrael
imported>QQuix
(Byline removed)
 
(10 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{Tools|req0=[[The Elder Scrolls Construction Set|Construction Set]]}}
'''This is a short tutorial which will give you a quick walkthrough for making your first script. It will detail step-by-step the script making process and should take a total of about 5-10 minutes.'''
'''This is a short tutorial which will give you a quick walkthrough for making your first script. It will detail step-by-step the script making process and should take a total of about 5-10 minutes.'''


Line 5: Line 7:




# Open the Oblivion Construction Set.
# Open The Elder Scrolls Construction Set.
# Go to File --> Data and a window will pop up. Double click Oblivion.esm to check it and click OK. (Then wait for it to load.)
# Go to File --> Data and a window will pop up. Double click Oblivion.esm to check it and click OK. (Then wait for it to load.)
# In the Object Window, navigate through and find Lockpicks. You'll find this under Items --> Misc Item. (If you don't have a lockpick, any common item will work, like an apple or something.) Double click the item.
# In the Object Window, navigate through and find Lockpicks. You'll find this under Items --> Misc Item. (If you don't have a lockpick, any common item will work, like an apple or something.) Double click the item.
# A window will pop up with the item's properties. Where it says Script: NONE, click the 3 little dots next to it. This will open the Script Editor.
# A window will pop up with the item's properties. Where it says Script: NONE, click the 3 little dots next to it. This will open the Script Editor.
# Go to Script --> New, to start a new script.
# Go to Script --> New, to start a new script.
# Cut and paste the following:
# Cut and paste the following:<br><br>
#:ScriptName HelloWorld<br><br>
#:''ScriptName HelloWorld<br><br>''
#:Begin OnAdd
#:''Begin OnAdd''
#:Message "Hello World!", 10
#:''Message "Hello World!", 10''
#:end
#:''end''<br><br>
# Save the script and then close the Script Editor.
#:Info about the script itself:
#:- The first line is the name of your script.  Make sure it is unique.
#:- "Begin OnAdd" means that this script will fire each time you pick up this item.  The end command ends the section of script related to "OnAdd".  You can have a separate begin/end block for every blocktype - see [[Begin]]
#:- And lastly, the message line controls what will be displayed, with the "10" as how long the message will stay on screen. Check here for more info about the message command: [[Message]]
# Save the script and then close the Script Editor and the subject's(In this case, the lockpick's) property window, your script will not appear until this is done.
# Go back to the item properties and "HelloWorld" should appear as an option in the dropdown menu for Scripts. (You may have to close the item properties window and re-open it for the HelloWorld script to appear in the dropdown menu.)
# Go back to the item properties and "HelloWorld" should appear as an option in the dropdown menu for Scripts. (You may have to close the item properties window and re-open it for the HelloWorld script to appear in the dropdown menu.)
# Hit ok to save and close the window.
# Hit ok to save and close the window.
Line 24: Line 30:




-Page by Tyrrael, and some helpful people: TitusFrost, mmmpld, Tellin, Talith, Kyne, mojo892
 
For a more advanced scripting tutorial, see [[Scripting Tutorial: My Second Script|My Second Script]].
 
[[Category:Tutorials]]
[[Category:Scripting Tutorials]]
Anonymous user