Game Maker Studio: How to Flip Sprites, Die, & Keyboard, Mouse Press. VIDEO
Visit my Amazon Mobile App site: https://amzn.to/2YsAKZA
GMX File: https://bit.ly/2YXAwpx
(Note): 8/24/19: I tried to create buttons for the Android device, the flip worked for the left side of the player, but not for the right side of the player. So, this would only work for Windows. Did not talk about Boss Movements, will talk more on the subject, when I talk about Player and Boss Custom Health Bars. You can open the GMX file, and see how the Boss movement are setup.
obj_right
Events:
Create
Actions:
randomize();
image_speed = 0;
facing =1;
Events:
Step
Actions:
if(keyboard_check_pressed(vk_right)) facing = 1;
if(keyboard_check_pressed(vk_left)) facing = -1;
if(mouse_check_button_pressed(mb_right)) facing = 1;
if(mouse_check_button_pressed(mb_left)) facing = -1;
Events:
Draw
Actions:
draw_sprite_ext(sprite_index,image_index,x,y,facing,1,0,c_white,1);
obj_dead
Events:
Create
Actions:
instance_deactivate_object(obj_dead)
target = obj_bad1;
myspeed = 0;
length = 0;
place = 0;
Events:
Step
Actions:
x = obj_bad1.x + lengthdir_x(length,place);
y = obj_bad1.y + lengthdir_y(length,place);
place += myspeed;
Other Videos By MC Designs 2019-10-19 Game Maker Studio: How to Collect Partial or Full Health. 2019-10-12 Game Maker Studio: How to Create getting Hit & Blinking. 2019-10-06 Game Maker Studio: How to Create a Rotating Moving Sun & Border Walls. 2019-09-21 Game Maker Studio: How to Hide & Appear, using a Mask Code. 2019-09-21 Game Maker Studio: How to Hide Player, without getting Hit by Weapons. 2019-09-15 Game Maker Studio: How to Reduce on File Size & Shortcuts. 2019-09-07 Game Maker Studio: How to Create a Shader Shadow Effect. 2019-09-01 Game Maker Studio: How to Create Follow Movement, to Strike Object, in a Perfect Location. 2019-08-25 Game Maker Studio: (Part 2) How to Master Boss Movements & Two Custom Health Bars. 2019-08-25 Game Maker Studio: (Part 1) How to Master Boss Movements & Two Custom Health Bars. 2019-08-11 Game Maker Studio: How to Flip Sprites, Die, & Keyboard, Mouse Press. 2019-08-03 Game Maker Studio: How to Create Simple Snow, Rain or Hail, background. 2019-07-28 Game Maker Studio: How to Create a Fire Particle Background. 2019-07-21 Game Maker Studio: (Part 2) How to Collect & Enter Password, to Move to Next Room. 2019-07-21 Game Maker Studio: (Part 1) How to Collect & Enter Password, to Open Door. 2019-07-14 Game Maker Studio: (Part 2) How to Gain Health, using a Custom Health bar. 2019-07-13 Game Maker Studio: (Part 1) How to Master Custom Health bar. 2019-06-29 Game Maker Studio: (Part 2) How to Master Check Point & Lives. 2019-06-23 Game Maker Studio: (Part 1) How to Master Check Point. 2019-06-23 Game Maker Studio: How to Create a Simple Save & Load. 2019-06-08 Game Maker Studio: (Part 2) How to Scroll Left to Right on Screen.
Tags: switch
flip
sprite
move
stop
code
game
maker
studio
teach
learn
how
keyboard
mouse
press
pressed
die
image
computer
create
instance
background
show
pc
white
moving
direction
speed
index
gmx
change
vspeed
hspeed
randomize
random
step
object
space
save
check