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

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Tyrrael
imported>Tyrrael
Line 1: Line 1:
'''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.'''


Let's get started:


So let's get started:




'''Step 1.''' Open the Oblivion Construction Set
# Open the Oblivion 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.)
'''Step 2.''' Go to File --> Data and a window will pop up. Double click Oblivion.esm to check 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.
 
# 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.
'''Step 3.''' In the Object Window, navigate through and 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.
# Go to Script --> New, to start a new script.
 
# Cut and paste the following:
'''Step 4.''' 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.
#:ScriptName HelloWorld<br><br>
 
#:Begin OnAdd
'''Step 5.''' Go to Script --> New, to start a new script.
#:Message "Hello World!", 10
 
#:end
'''Step 6.''' Cut and paste the following:
# Save the script and then close the Script Editor.
 
# 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.)
:ScriptName HelloWorld
# Hit ok to save and close the window.
 
# Go up to the top and hit File --> Save; name it HelloWorld (it will be an esp file, HelloWorld.esp)
:Begin OnAdd<br>
# Open the Oblivion start menu (the splash screen), and click on Data Files.
:Message "Hello World!", 10<br>
# Double click on your HelloWorld.esp to check / enable it and click ok to save and close.
:end
# Now go into the game and you should be set! Drop a lockpick on the ground and pick it back up and a message should say "Hello World!". And with that, welcome to scripting!
 
'''Step 7.''' Save the script and then close the Script Editor.
 
'''Step 8.''' 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.)
 
'''Step 9.''' Hit ok to save and close the window.
 
'''Step 10.''' Go up to the top and hit File --> Save; name it HelloWorld (it will be an esp file, HelloWorld.esp)
 
'''Step 11.''' Open the Oblivion start menu (the splash screen), and click on Data Files.
 
'''Step 12.''' Double click on your HelloWorld.esp to check / enable it and click ok to save and close.
 
'''Step 13.''' Now go into the game and you should be set! Drop a lockpick on the ground and pick it back up and it should say "Hello World!". And with that, welcome to scripting!




-Page by Tyrrael, and some helpful people: TitusFrost, mmmpld, Tellin, Talith, Kyne, mojo892
-Page by Tyrrael, and some helpful people: TitusFrost, mmmpld, Tellin, Talith, Kyne, mojo892

Revision as of 23:17, 6 April 2006

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.


So let's get started:


  1. Open the Oblivion Construction Set.
  2. 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.)
  3. 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.
  4. 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.
  5. Go to Script --> New, to start a new script.
  6. Cut and paste the following:
    ScriptName HelloWorld

    Begin OnAdd
    Message "Hello World!", 10
    end
  7. Save the script and then close the Script Editor.
  8. 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.)
  9. Hit ok to save and close the window.
  10. Go up to the top and hit File --> Save; name it HelloWorld (it will be an esp file, HelloWorld.esp)
  11. Open the Oblivion start menu (the splash screen), and click on Data Files.
  12. Double click on your HelloWorld.esp to check / enable it and click ok to save and close.
  13. Now go into the game and you should be set! Drop a lockpick on the ground and pick it back up and a message should say "Hello World!". And with that, welcome to scripting!


-Page by Tyrrael, and some helpful people: TitusFrost, mmmpld, Tellin, Talith, Kyne, mojo892