Game Maker Studio: How to Collect Partial or Full Health.

Channel:
Subscribers:
271
Published on ● Video Link: https://www.youtube.com/watch?v=3e4DES1EAjI



Duration: 17:04
41 views
0


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-14Game Maker 8.1: How to Draw 3D Models, using Code.
2019-12-07Game Maker 8.1: How to Create a Outside Sky with Rain.
2019-12-01Game Maker 8.1: How to Create Animated Torches on the Walls & Adding Monsters.
2019-11-24Game Maker 8.1: (Part 3) How to Create Bad Guy, Firing Weapon.
2019-11-24Game Maker 8.1: (Part 2) How to Create Bad Guy, Firing Weapon.
2019-11-24Game Maker 8.1: (Part 1) How to Create Bad Guy, Firing Weapon.
2019-11-16Game Maker 8.1: How to Create Cell Door PNG, Fire Pit, Load Game, & Favicon image.
2019-11-09Game Maker 8.1: How to Move through Walls, & Create you're own Fog Areas.
2019-11-02Game Maker 8.1: How to Move to the Next Room, Weapons, & Ammo Count.
2019-10-26Game Maker Studio: How to Show Final Hit Effect for Player & Boss, before Game Ends.
2019-10-19Game Maker Studio: How to Collect Partial or Full Health.
2019-10-12Game Maker Studio: How to Create getting Hit & Blinking.
2019-10-06Game Maker Studio: How to Create a Rotating Moving Sun & Border Walls.
2019-09-21Game Maker Studio: How to Hide & Appear, using a Mask Code.
2019-09-21Game Maker Studio: How to Hide Player, without getting Hit by Weapons.
2019-09-15Game Maker Studio: How to Reduce on File Size & Shortcuts.
2019-09-07Game Maker Studio: How to Create a Shader Shadow Effect.
2019-09-01Game Maker Studio: How to Create Follow Movement, to Strike Object, in a Perfect Location.
2019-08-25Game Maker Studio: (Part 2) How to Master Boss Movements & Two Custom Health Bars.
2019-08-25Game Maker Studio: (Part 1) How to Master Boss Movements & Two Custom Health Bars.
2019-08-11Game 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