0ADC
Revision as of 04:02, 29 January 2017 by Spaceeinstein (talk | contribs)
(with CLEO)
- Description
- Tests the cheat
- Syntax
- 0ADC: test_cheat "[string]"
- Parameter
- [string]
- Input cheat, maximum 30 characters
This conditional CLEO opcode returns true if the specified string of letters has been typed on the keyboard as though you are inputting a cheat code. Any lower case letters (a-z) are converted to upper case by CLEO during run-time.
Example
The following example pops up different notifications when you type "CHEAT". The notifications remain on the screen a bit longer than ones that pop up when in-game cheats are used.
// set constants const IS_ACTIVE = 0@ end // initialise IS_ACTIVE = 0 while true wait 10 if 0ADC: test_cheat "CHEAT" then if IS_ACTIVE == 0 then IS_ACTIVE = 1 0ACA: show_text_box "Cheat activated" else IS_ACTIVE = 0 0ACA: show_text_box "Cheat deactivated" end end end
Keywords
test, cheat