I Wanna Community

Fangames => Game Design => Topic started by: Jovancece on September 15, 2018, 08:17:44 AM

Title: How do you add God mode into your fangame? (For testing purposes)
Post by: Jovancece 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.
Title: Re: How do you add God mode into your fangame? (For testing purposes)
Post by: PiranhaTooth 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.