From EDukeWiki
Jump to navigation Jump to search
EVENT_ACTIVATECHEAT myconnectindex player->i 1 value

This event is called every time a cheat code is entered (see Cheatkeys, Definecheat, Cheat_phase). The gamevar RETURN is set to the cheat ID number.

You can modify RETURN to change the cheat that was entered, or you can completely disable the cheat by setting RETURN to -1.

At this time, RETURN values are ignored when the event is called for cheat #26 because it is used for debugging by the developers.

Note that the effects of the cheats DNSKILL and DNSCOTTY are applied before the event fires. The former alters m_player_skill, while the latter alters m_level_number and m_volume_number. As such, it is possible to detect the chosen skill level, respectively episode and level inside the event. Also note that, if those cheats were called and RETURN is altered, these values will automatically be reset.


The following values are used with activatecheat, definecheat, definecheatdescription and EVENT_ACTIVATECHEAT.

Exposed Value Label Description
No 0 CHEAT_CORNHOLIO Toggle god mode and infinite Jetpack
No 1 CHEAT_STUFF Give all weapons, inventory and keys
No 2 CHEAT_SCOTTY Change level to ###
No 3 CHEAT_COORDS Display coordinates
No 4 CHEAT_VIEW Toggle third-person view
No 5 CHEAT_TIME Prints the message "Crosshair: off"
No 6 CHEAT_UNLOCK Activate all doors, switches, etc
No 7 CHEAT_CASHMAN Spawn money when pressing use
No 8 CHEAT_ITEMS Give all inventory and keys
No 9 CHEAT_RATE Display frame rate
No 10 CHEAT_SKILL Change skill level to #
No 11 CHEAT_BETA Prints the message "Pirates Suck!"
No 12 CHEAT_HYPER Give and use Steroids
No 13 CHEAT_MONSTERS Toggle monsters
No 16 CHEAT_TODD Prints the message "Register Cosmo Today!"
No 17 CHEAT_SHOWMAP Toggle full automap
No 18 CHEAT_KROZ Toggle god mode
No 19 CHEAT_ALLEN Prints the message "Buy Major Stryker"
No 20 CHEAT_CLIP Toggle no-clipping mode
No 21 CHEAT_WEAPONS Give all weapons
No 22 CHEAT_INVENTORY Give all inventory
No 23 CHEAT_KEYS Give all keys
No 24 CHEAT_DEBUG Display debug data and create debug.map file
No 26 CHEAT_COMEGETSOME Toggles godmode, gives full health + armor and gives all keys, weapons and ammo (no inventory items). Unlike CHEAT_KROZ, does not unset the 'dead' flag on the player.
define CHEAT_CORNHOLIO                  0
define CHEAT_STUFF                      1
define CHEAT_SCOTTY                     2
define CHEAT_COORDS                     3
define CHEAT_VIEW                       4
define CHEAT_TIME                       5
define CHEAT_UNLOCK                     6
define CHEAT_CASHMAN                    7
define CHEAT_ITEMS                      8
define CHEAT_RATE                       9
define CHEAT_SKILL                      10
define CHEAT_BETA                       11
define CHEAT_HYPER                      12
define CHEAT_MONSTERS                   13
define CHEAT_TODD                       16
define CHEAT_SHOWMAP                    17
define CHEAT_KROZ                       18
define CHEAT_ALLEN                      19
define CHEAT_CLIP                       20
define CHEAT_WEAPONS                    21
define CHEAT_INVENTORY                  22
define CHEAT_KEYS                       23
define CHEAT_DEBUG                      24
define CHEAT_COMEGETSOME                26