Difference between revisions of "Flying"
Jump to navigation
Jump to search
m
no edit summary
imported>8asrun6aer m |
imported>8asrun6aer m |
||
Line 8: | Line 8: | ||
The main principle here is avoiding using the [[SetPos]] method of flying, and thus avoid clipping. Instead, this script works with a player's x,y,z velocities. | The main principle here is avoiding using the [[SetPos]] method of flying, and thus avoid clipping. Instead, this script works with a player's x,y,z velocities. | ||
If you see any part of the example script that can be made more efficient, feel free to edit. | If you see any part of the example script that can be made more efficient or made easier to read, feel free to edit. | ||
== Requirements == | == Requirements == | ||
Line 27: | Line 27: | ||
Also, note the only code block used by this 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 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. | ||
To easily distinguish local variables for the sake of readability in this example script, each new local variable name begins with 'cstm'. | 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. | ||
<pre> | <pre> |