BSL:Game status: Difference between revisions
Jump to navigation
Jump to search
(content moved here from "Difficulty" since "Difficulty" needs to be the command info page for "difficulty") |
m (wording, linked to new difficulty mode article) |
||
Line 1: | Line 1: | ||
Oni has three difficulty modes: | Oni has three difficulty modes: Easy (0), Normal (1), and Hard (2). Characters get more health and can also be replaced by a stronger version of themselves on Hard mode (see [[XML:ONCV]]), besides other changes listed on [[Difficulty modes]]. | ||
With | With [[Developer Mode]] switched on, you can get the mode by typing ''difficulty'' into the console. The mode can only be read, not changed. | ||
You can use ''difficulty'' with "if" statements to make the script more flexible. | |||
You can use ''difficulty'' | |||
func your_function_1 | func your_function_1 | ||
{ | { | ||
# | # Regular level code with no modifications (can be considered as the Easy mode code), | ||
# | # and if the difficulty is not Easy you can tell the script to do this or that... | ||
if (difficulty () eq 1) | if (difficulty () eq 1) | ||
{ | { | ||
# | # Normal | ||
# give enemy a weapon, more health, etc | # give enemy a weapon, more health, etc. | ||
} | } | ||
if (difficulty () eq 2) | if (difficulty () eq 2) | ||
{ | { | ||
# | # Hard | ||
# spawn additional enemies | # spawn additional enemies | ||
} | } |
Latest revision as of 20:15, 7 December 2023
Oni has three difficulty modes: Easy (0), Normal (1), and Hard (2). Characters get more health and can also be replaced by a stronger version of themselves on Hard mode (see XML:ONCV), besides other changes listed on Difficulty modes.
With Developer Mode switched on, you can get the mode by typing difficulty into the console. The mode can only be read, not changed.
You can use difficulty with "if" statements to make the script more flexible.
func your_function_1 { # Regular level code with no modifications (can be considered as the Easy mode code), # and if the difficulty is not Easy you can tell the script to do this or that... if (difficulty () eq 1) { # Normal # give enemy a weapon, more health, etc. } if (difficulty () eq 2) { # Hard # spawn additional enemies } }