Author Topic: How do you add God mode into your fangame? (For testing purposes)  (Read 873 times)

Jovancece

  • Wannabe
  • Posts: 3
  • Hi there.
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Chrome 68.0.3440.106 Chrome 68.0.3440.106
    • View Profile
  • Playstyle: Keyboard
How do you add God mode into your fangame? (For testing purposes)
« on: September 15, 2018, 08:17:44 AM »
I was wondering on how to add God mode into my fangames so i can test some stuff.
jov.

PiranhaTooth

  • Wannabe
  • Posts: 38
  • I'm a totally mediocre fangame player...
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Chrome 68.0.3440.106 Chrome 68.0.3440.106
    • View Profile
    • Steam Profile
  • Playstyle: Keyboard
Re: How do you add God mode into your fangame? (For testing purposes)
« Reply #1 on: September 15, 2018, 03:24:49 PM »
You'd want to create a global variable called global.godMode or something and on keyboard_check_pressed(whatever key you want godmode toggle to be) toggle it from false to true, or true to false. Then you want to go to where the player collides with objPlayerKiller and encase that code in an if-statement checking if global.godMode == false. That's the quickest and easiest way to do it.
Meme connoisseur of many Twitch chats...