Difference between revisions of "Flying"
Jump to navigation
Jump to search
no edit summary
Tag: Manual revert |
|||
Line 1: | Line 1: | ||
== Introduction == | == Introduction == | ||
Flying isn't normally something players can do. Here's a script to allow that. | Flying isn't normally something players can do. Here's a script to allow that. | ||
This isn't so much of a snippet of code as it is the complete code for allowing a player to fly in a more or less natural way. The script below uses velocity functions that prevent wall, ceiling, floor, and obstacle clipping. Setting up when and how to allow the player to fly (via casted spell or constant ability) is up to you - the modder. But for this article, we'll be setting up a new constant Player Ability which will allow the player to initiate flying at any time by pressing a key. | This isn't so much of a snippet of code as it is the complete code for allowing a player to fly in a more or less natural way. The script below uses velocity functions that prevent wall, ceiling, floor, and obstacle clipping. Setting up when and how to allow the player to fly (via casted spell or constant ability) is up to you - the modder. But for this article, we'll be setting up a new constant Player Ability which will allow the player to initiate flying at any time by pressing a key. | ||