Game Maker Studio: How to Deactivate & Reactivate Keyboard Key’s after getting Hit.

Channel:
Subscribers:
268
Published on ● Video Link: https://www.youtube.com/watch?v=BG_55p5pmyA



Duration: 13:04
188 views
0


Visit my anime and game site: http://mcanime1.wixsite.com/mcanime

GMX file: https://bit.ly/2L2tdX7

Moveright:

Events:

Collision with Spike:

Action:

keyboard_clear(vk_right,)
keyboard_set_map(vk_right,"")

This top code will deactivate your keyboard key moving right, don't forget to put in the other movements as well as the weapon button. For an example: vk_enter, maybe used to fire weapon.

So when he gets hit by the spikes, he will switch to getting hit image for so many seconds. One of the getting hit images going right is called "object37". After so many seconds he will blink meaning he is getting hit.

Object37:

Event:

Create:

Actions:

Set Alarm 0 to room_speed*1

Events:

Alarm 0

Actions:

Set Alarm 0 to room_speed*1

keyboard_set_map(vk_right,vk_right)

The top code above is for moving right, don't forget to put in the other movements and button you will us to fire, this will allow the keyboard keys to work again.




Other Videos By MC Designs


2018-11-18Game Maker Studio: How to Create a Particle System without Code.
2018-11-08Game Maker Studio: How to Master a Precise Collision hit.
2018-11-01Game Maker Studio: How to Show +1 Point Animation Collect from a Coin & Checkpoint.
2018-10-27Game Maker Studio: How to Swing on Rope.
2018-10-22Game Maker Studio: How to Create a Screen Shake.
2018-10-13Game Maker Studio: Mastering Rain.
2018-10-07Game Maker Studio: How to Create a Parallax Background.
2018-07-15Game Maker Studio: How to Unlock Rooms in You're Game.
2018-06-16Game Maker Studio: How to Collect a Certain Number of Coins to Gain Health.
2018-06-09Game Maker Studio: How to Create Enemy Health Bars above their heads.
2018-05-27Game Maker Studio: How to Deactivate & Reactivate Keyboard Key’s after getting Hit.
2018-05-20Game Maker Studio: How to Move to the Next Room after Collecting Certain Amount of Coins.
2018-04-07Game Maker Studio: How to Create Boss Movements with Custom Health bar.
2018-03-24Game Maker Studio: How to Create Enemy Hit Points.
2018-03-18Game Maker Studio: How to go from Day to Night, Night & Day.
2018-02-25Game Maker Studio: How to Create Random Objects.
2018-02-04Game Maker Studio: How to Create Special Effects.
2018-01-21Game Maker Studio: How to Make you’re File Image Icons Larger on Screen.
2018-01-13Game Maker Studio: How to Create a Mini Map.
2018-01-08Game Maker Studio: How to Create Lives & Healthbar for Player & Boss.
2017-12-09Game Maker Studio: How to select a player & continue background sound.



Tags:
computer
keyboard
pc
windows
game
maker
studio
how
learn
teach
deactivate
reactivate
key
board
hit
change
get
keys
vk