Description
The RunByDefault
property determines whether the player character will run by default. If set to true
, the player will run automatically, and holding the AltMoveButton
will switch the player to walking mode. This property is useful for games where running is the primary mode of movement, allowing players to toggle between running and walking easily.
Usage
To use the RunByDefault
property, simply set it to true
or false
depending on whether you want the player to run by default or not. This can be done in the initialization of your player controller or dynamically during gameplay based on certain conditions or player preferences.
Example
// Example of setting the RunByDefault property
PlayerController playerController = new PlayerController();
// Set the player to run by default
playerController.RunByDefault = true;
// Later in the game, you might want to switch to walking by default
playerController.RunByDefault = false;