Game Maker Studio: How to Collect Partial or Full Health.
Visit my MC Art Gallery site: https://mcolverartgallery.wixsite.com/gallery
GMX File: https://bit.ly/2J2BJGL
obj_collectit
Events:
Collision with obj_health
Actions:
if(image_index = 0)image_index = 0;
with (obj_health)
{
instance_change(obj_healthnotyet, true);
}
if(image_index = 4)image_index = 3;
//else
if(image_index = 3)image_index = 2;
//else
if(image_index = 2)image_index = 1;
//else
if(image_index = 1)image_index = 0;
or
obj_collectit
Events:
Collision with obj_health
Actions:
//if(image_index = 0)image_index = 0;
//with (obj_health)
//{
//instance_change(obj_healthnotyet, true);
//}
if(image_index = 4)image_index = 3;
else
if(image_index = 3)image_index = 2;
else
if(image_index = 2)image_index = 1;
else
if(image_index = 1)image_index = 0;
Forgot to talk about this in video:
You want a Destroy the instance "Other" means, obj_collectit will destroy the health box when he hits it.
Other Videos By MC Designs
2019-12-14 | Game Maker 8.1: How to Draw 3D Models, using Code. |
2019-12-07 | Game Maker 8.1: How to Create a Outside Sky with Rain. |
2019-12-01 | Game Maker 8.1: How to Create Animated Torches on the Walls & Adding Monsters. |
2019-11-24 | Game Maker 8.1: (Part 3) How to Create Bad Guy, Firing Weapon. |
2019-11-24 | Game Maker 8.1: (Part 2) How to Create Bad Guy, Firing Weapon. |
2019-11-24 | Game Maker 8.1: (Part 1) How to Create Bad Guy, Firing Weapon. |
2019-11-16 | Game Maker 8.1: How to Create Cell Door PNG, Fire Pit, Load Game, & Favicon image. |
2019-11-09 | Game Maker 8.1: How to Move through Walls, & Create you're own Fog Areas. |
2019-11-02 | Game Maker 8.1: How to Move to the Next Room, Weapons, & Ammo Count. |
2019-10-26 | Game Maker Studio: How to Show Final Hit Effect for Player & Boss, before Game Ends. |
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. |
Tags: android
pc
computer
device
phone
how
teach
learn
game
maker
studio
boss
fall
hit
points
health
bar
custom
collision
restart
lives
image
index
speed
object
instance
gain
multiple
partial
full
else
collect
if
true
with
switch
change