GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

I need help with animating a pacing actor and his death scene!

SteamworksSteamworks Posts: 61Member
So i created a gumba type enemy that paces back and forth and if u jump on top of him then he will die. the only problem is i don't know how to animate him. I already have him animated for going right but once he turns around i don't know how to flip the animation.
I have it set up so that when the actor reaches a certain point his velocity turns negative and he goes backwards until he reaches another point. when he reaches the first point his velocity turns back to normal and he goes forward again.

I also need help with the death animation of this actor. so i have an animation of him rotating i just need to set it so when he dies he starts rotating and falls off the screen. how would i make him fall?

Comments

  • SteamworksSteamworks Posts: 61Member
    ok i figured out the death scene on my own.
    when my player jumps on the enemy's hitbox (the enemies head) he turns actorxdestroy on to true
    when actorxdestroy is true then the enemy turns collide on with the player.
    as the player falls he collides with the enemy and the enemy is sent rocketing downward.
    i dont even need an animation for this case if u jump straight on top of him then he falls straight down.
    if i jump from an angle then i hit a corner of the hit box and he'll be sent spiraling downward.
    it looks great and after 1 second he is destroyed so he isn't falling straight down forever.

    Now i just need someone to help me with his animation walking back and forth.
  • SteamworksSteamworks Posts: 61Member
    ok nvm i figured out the flipping on my own. (no one helps me T.T)
    when the enemy is moving right his x velocity is 50.
    when the enemy is moving left his velocity is -50.
    so i created 2 rules.
    1. when "self.motion.linear velocity x = -50" then change attribute "self.graphic.flip horizontal = true"
    2. when "self.motion.linear velocity x = 50" then change attribute "self.graphic.flip horizontal = false"
This discussion has been closed.