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

imported>Illincrux
imported>Illincrux
Line 106: Line 106:
===Saving and preparing the mod===
===Saving and preparing the mod===
Now our script is already capable of being run, so lets test it:
Now our script is already capable of being run, so lets test it:
* '''Save the script and close the script editor window.'''
* Save the script and close the script editor window.
* '''Go to the Object Window, and proceed in order through the directories of ''WorldObjects > Container > Clutter'' until you find the object with the Editor ID of CupboardFoodLower.'''
* Look to the Object Window, and proceed in order through the directories of ''WorldObjects > Container > Clutter'' until you find the object with the Editor ID of CupboardFoodLower.
* '''Now either right-click and choose Edit or double-click the object to bring up its properties.'''
* Now either right-click and choose Edit or double-click the object to bring up its properties.
* '''In the script dropdown field, select RiddleChestScript. Hit OK, save the mod, and quit TESCS. NOTE: WHAT WE HAVE JUST DONE, EDITING AN ITEM WITHOUT RENAMING IT, IS TERRIBLE MODDING PRACTICE.  NEVER DO THIS UNLESS YOU ARE ''SURE'' YOU KNOW WHAT YOU ARE DOING!'''
* In the script dropdown field, select the script you just made RiddleChestScript.
* Hit OK, save the mod, and quit TESCS.
 
'''NOTE: PAY ATTENTION TO WHAT WE HAVE JUST DONE. EDITING AN OBJECT WITHOUT GIVING IT A NEW ''ID'' IS TERRIBLE MODDING PRACTICE.  NEVER DO THIS UNLESS YOU ARE ''SURE'' YOU KNOW WHAT YOU ARE DOING!'''


===The script in-game===
===The script in-game===
Anonymous user