meter_percentage = ((hp/hp_max*100))*10
with (instance_place(x, y, HealthMeterObj100)) {
instance_destroy();
}
with (instance_place(x, y, HealthMeterObj80)) {
instance_destroy();
}
with (instance_place(x, y, HealthMeterObj60)) {
instance_destroy();
}
with (instance_place(x, y, HealthMeterObj40)) {
instance_destroy();
}
with (instance_place(x, y, HealthMeterObj20)) {
instance_destroy();
}
with (instance_place(x, y, HealthMeterObj0)) {
instance_destroy();
}
show_debug_message("hp/hp_max: " + string(hp/hp_max))
show_debug_message("HPTOTAL: " + string(hp/hp_max*100))
//instance_create_depth(x, y, -1600, HealthMeterObj100);
show_debug_message("Health is x: " + string(x));
show_debug_message("Health is y: " + string(y));
show_debug_message("Crown is x:" + string(x))
show_debug_message("Crown is y:" + string(y))
if (meter_percentage > 80)
{
instance_create_depth(x, y, -1600, HealthMeterObj100);
}
else if (meter_percentage > 60)
{
instance_create_depth(x, y, -1600, HealthMeterObj80);
}
else if (meter_percentage > 40)
{
instance_create_depth(x, y, -1600, HealthMeterObj40);
}
else if (meter_percentage > 40)
{
instance_create_depth(x, y, -1600, HealthMeterObj40);
}
else if (meter_percentage > 20)
{