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

imported>Illincrux
imported>Illincrux
===Saving and preparing the mod===
Now our script is already capable of being run, so lets test it:
* '''Save the script and close the script editor window.'''
* '''GoLook 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.'''
* In the script dropdown field, select the script you just made RiddleChestScript.
* '''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!'''▼
* Hit OK, save the mod, and quit TESCS.
 
▲* '''InNOTE: thePAY scriptATTENTION dropdown field, select RiddleChestScript. Hit OK, save the mod, and quit TESCS. NOTE:TO WHAT WE HAVE JUST DONE,. EDITING AN ITEMOBJECT WITHOUT RENAMINGGIVING 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===
Anonymous user