"Programmers Cheats"

Started by Digital Mosaic Games, Mon 11/04/2011 20:07:39

Previous topic - Next topic

Digital Mosaic Games

Hey AGS-Friends,

I call them "Programmers-Cheats". They help you to test your game quicker. You know the keycombos with which you can teleport to every room or get all Inventoryitems or make walkable areas visible. Usually you delete these pieces of code.
I deleted them for a demo and now I don't know where I got it from! Can someone tell me these lines? :-\

Thanks!

Dualnames

Code: ags

function on_key_press(int keycode) {  
  if (keycode == eKeyCtrlS)  Debug(0,0);  // Ctrl-S, give all inventory
  if (keycode == eKeyCtrlV)  Debug(1,0);  // Ctrl-V, version
  if (keycode == eKeyCtrlA)  Debug(2,0);  // Ctrl-A, show walkable areas
  if (keycode == eKeyCtrlX)  Debug(3,0);  // Ctrl-X, teleport to room
  if (keycode == eKeyCtrlW && game.debug_mode) player.PlaceOnWalkableArea(); //Ctrl-W, move to walkable area
} 
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Digital Mosaic Games


Ryan Timothy B

If you're releasing a demo or game, you'll want to disable debug mode entirely. Go to the General Settings tab and in the Compiler section turn Enable Debug Mode to false. Then it won't matter if you have the debug keycodes, it won't run them anyway.

But it is probably good practice to comment or delete those lines if it's a full release game along with disabling debug mode.

SMF spam blocked by CleanTalk