VG:Cheat System

From MyProjectFun
Jump to: navigation, search

Hello, Connor H. here, and I have devised a system that can handle cheat codes in a very elegant way. I have a dictionary that holds active cheats and their values, and an indexed property for reading/creating/modifying/removing cheats from the list.

If I wanted to see if godmode was set to 1, I could use:

if (Cheats.cheats[ "godmode" ] == 1)
{
  // Do something
}

or I could use this to turn godmode on:

Cheats.cheats[ "godmode" ] = 1;

regardless of whether is existed in the dictionary yet. A cheat can be any string, and it's value can be any positive signed int. the system interprets a negative value as removing the object. Happy programming!

If you just add the file to your project, you can start using it! No variable setup is necessary!

Personal tools
Namespaces
Variants
Actions
Navigation
Engineering
Game Design
Multimedia Production
VG Programming
Downloads
Toolbox