Day 68

Today I finally fixed my problem of the goblin animation.

Most of the class today I was helping out Kody Brooks with his programming in GML but I still got some work done.

I removed my death state because it didn't really make sense. And I added this code inside of the current states:
if hp <= 0
{
    state = scr_enemy_static
}

What this does is that it changes to the static state (or idle state) then inside of the static state I put this:

if hp <= 0
{
    sprite_index = spr_goblin_death;
    image_speed = 0.3;
}

I made the actual sprite switch inside of the idle state, And it worked!

Tomorrow I will be working more on the goblin AI.

3 comments: