Difference between revisions of "Flying"
Jump to navigation
Jump to search
m
no edit summary
imported>8asrun6aer m |
imported>8asrun6aer m |
||
Line 25: | Line 25: | ||
Before continuing, you'll want to create a new [[Globals|Global]] variable. In the [[The_Elder_Scrolls_Construction_Set|TES CS]] main menu, go to Gameplay -> Globals menu, right-click in the list of globals, select "New", and for the Form ID, enter ''cstmGlobalPlayerIsFlying'' as a ''short'' with value ''0''. This ''cstmGlobalPlayerIsFlying'' global variable holds the flying state of the player. It's meant to be global so that the player's flying state can be easily checked or altered in other scripts. | Before continuing, you'll want to create a new [[Globals|Global]] variable. In the [[The_Elder_Scrolls_Construction_Set|TES CS]] main menu, go to Gameplay -> Globals menu, right-click in the list of globals, select "New", and for the Form ID, enter ''cstmGlobalPlayerIsFlying'' as a ''short'' with value ''0''. This ''cstmGlobalPlayerIsFlying'' global variable holds the flying state of the player. It's meant to be global so that the player's flying state can be easily checked or altered in other scripts. | ||
Also, note the only code block used by this example magic effect script is the [[ScriptEffectUpdate]] block. The [[ScriptEffectFinish]] block is irrelevant to constant abilities, and the [[ScriptEffectStart]] block would make this script too dependent on initial new game environments. | Also, note the only code block used by this example magic effect script is the [[ScriptEffectUpdate]] block. The [[ScriptEffectFinish]] block is irrelevant to constant abilities, and the [[ScriptEffectStart]] block would make this script too dependent on initial new game environments. Though if made part of a regular duration spell effect, you could use [[ScriptEffectStart]] for set up, and [[ScriptEffectFinish]] for cleanup. | ||
To easily distinguish local variables for the sake of readability in this example script, each new local variable name begins with 'cstm'. Also, the script is heavily commented to hopefully make each step more clear. | To easily distinguish local variables for the sake of readability in this example script, each new local variable name begins with 'cstm'. Also, the script is heavily commented to hopefully make each step more clear. |