How to Make Basic Invincibility Frames in GameMaker Studio

GameMaker-Studio-Logo

In video games, invincibility frames are the period of time when a player is invulnerable to a game’s hazards. They allow the player to make a mistake and have enough time to quickly move away from hazards. Without invincibility frames, moments of high challenge become frustrating for players that don’t have a high level of skill. While not every game requires invincibility frames, they are a feature that grants players a margin of error for how many times they can make a mistake.

To start, create 3 sprites and name them Spr_Player, Spr_Wall and Spr_Enemy1.

Tutorial Pic1

Then create 3 objects and name them Obj_Player, Obj_Wall and Obj_Enemy1

Tutorial Pic2

Select Obj_Wall and have Solid turned on

Tutorial Pic3

Then open up Obj_Player and put in these events:

Tutorial Pic4

Now make a sound file with the sound icon.

Tutorial Pic8

Select an MP3 file from your computer and in Target Options, Set it to Stereo and 16 bit.

In the Create event, enter the Control tab on the right. In the Variables section, select Set Variable and put in the following:

Tutorial Pic5

In the Alarm 0 event, put in the following:

Tutorial Pic6

In the Step event, put in the following:

Tutorial Pic7

In the Collision event with Obj_Enemy1, put in the following:

Tutorial Pic9

In the Draw event, put in the following: (For the code icon, put in image_alpha = Flash)

Tutorial Pic10

Once a room has been made and these 3 objects are placed in that room, the player should flash when coming into contact with the enemy and a sound effect will play. Do not hesitate to point out flaws and inaccuracies with this tutorial and I hope this has helped your title in progress.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s