Player / Enemy taking damage & dead state


Taking Damage


today i pretty much was going for attacking enemies and having enemies attack my player. was dealing with some problems on the enemy attacking the player two days ago.  for some reason the damage wasn't registering but it was printing the player was taking "null" damage. today i don't know what happened but it magically started working. the enemies have 2 health while the player has 3, so after 2 hits the slime turns red and stops. is also supposed to disappear and play that particle effect i had previously, but that's not working right now.

i was also coming across problems with my sword area2d hitting and registering the enemy. for some reason the enemy was not getting detected even though i was changing every collision layer ever. apparently since the slime was on my level already, that was never changing, even though i was adjusting the base scene. so i adjusted the slimes on the level already and then it started working.


Dead State

also added a dead state for the player. whenever my health reaches 0, my state is transitioned to a dead state which i'm assuming could include a game over screen and all of that eventually. registering the player was a lot easier for some reason, it just worked.


Limbo AI

this thing is crazy. if i was trying to figure it out by myself at first, i'd be so completely lost but it's starting to make more sense. i'm able to add more states and adjust some things if i need to like making things not able to move in current states (need to add can't move to dead state). it's pretty much laid out so you can have sequences (attack sequence, defeated sequence). it can check variables then activate the sequence and see what to do next. you can add cooldowns, playing animations, delay things, really interesting. incredibly confusing for someone like me. you have to add variables to the blackboard n all this shit, i don't know how you keep track of everything but it's there.


Leave a comment

Log in with itch.io to leave a comment.