====== .setmode ======
This article is about the command that changes mode settings within Wurst. For the command that changes the users [[mc>gamemode]], see [[cmd:.gm]].
^ .setmode ^^
|{{ setmode.webp?500 |The .help entry for .setmode.}}||
^Type|[[:Command]]|
^Category|[[:No Category|none]]|
^In-game description|"Changes a mode setting of a feature. Allows you to\\ switch modes through keybinds.\\ \\ Syntax: .setmode \\ .setmode (prev%%|%%next)"|
^[[:keybinds#default_keybinds|Default keybind]]|none|
^Source code|[[w7src>net/wurstclient/commands/SetModeCmd.java]]|
.setmode is a [[:command|chat command]] that allows the user to manage [[:EnumSetting]]s (Wurst 7) or [[:ModeSetting]]s (Wurst 6) through the chat.
Since any .setmode command can be turned into a [[:keybind]], this command also makes it possible to create keybinds that instantly change a ModeSetting/EnumSettting when a key is pressed.
===== Syntax =====
Main article: [[Command Syntax]]
* ''.setmode '' sets of to .\\ \\
* ''.setmode (prev|next)'' sets of to the next or previous mode.\\ \\
Examples:
* ''.setmode bunnyhop jump_if walking'' sets the [[:BunnyHop#Jump if]] setting in [[:BunnyHop]] to its "Walking" mode.\\ \\
* ''.setmode bunnyhop jump_if next'' sets the [[:BunnyHop#Jump if]] setting in [[:BunnyHop]] to its next mode.\\ \\
* ''.bind m .setmode bunnyhop jump_if next'' keybinds the M key to cycle through the different modes in [[:BunnyHop]]'s [[:BunnyHop#Jump if]] setting.\\ \\
* ''.bind m .setmode bunnyhop jump_if prev'' is similar to the above example, but cycles through the [[:BunnyHop#Jump if]] modes backwards.\\ \\
===== Changes =====
^Version^Changes^
|[[update:Wurst 2.15]]|Added ''.setmode''.|
|[[update:Wurst 2.20]]|''.setmode'' will now assume that all spaces in setting names have been replaced with underscores. This makes it possible to use ''.setmode'' on a setting with spaces in its name without result in a syntax error.|
|[[update:Wurst 7.0pre1]]|Temporarily removed ''.setmode''.|
|[[update:Wurst 7.0pre23]]|Re-added ''.setmode''.|