animation bug?

0 favourites
From the Asset Store
Match same tiles with each other as fast as you can and earn more score during a limited time!
  • okay so for some reason my animation upon death isnt working. however the exact same script works for the enemy. so why not my player. here is a screenshot

    ibb.co/cdNkb5

  • So what's happening?

    Does your Explosion object move to player's position, but not switching to "explode" animation? Or does it get destroyed with the player?

    You can test this - run your project in debug mode (Ctrl-F4), select Explosion object on the left panel, then allow your player to die. See what happens with the Explosion sprite.

  • it says the animation is playing but only see a box nothing else.

  • Can you post the capx ?

    Maybe there's a problem with the "health = 0", with your player's health going into the negatives, thus preventing the animation to start.

    But without a capx, and with such a small screenshot it's hard to tell.

  • OBLIVION

    If the Explosion object is not destroyed and is moved to the correct position, then it's either invisible, or transparent (opacity=0), or behind some other object, or animation is stopped on an empty frame. You should be able to check all these things in Debug mode.

    Are you using any effects or blend mode on your explosion? If yes, then remove them for testing.

  • thanks guys. here is the capx file. really not sure whats happening here.

    drive.google.com/file/d/0B_wGto ... sp=sharing

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • okay so i think the issue is where the player is destroyed at the end then all objects go with it. so the question is how do i assign the object to the player but then still keep it on the layer upon death (tried global)

  • when the player dies it just moves the object to the top left of the layer as if my player was their. need to somehow anchor it to the position before death

  • You need to save your project as a single file (.capx) and share this capx file. Not the .caproj file.

    Did you add Player and Explosion to the same container? Don't do it. If you destroy one object, all other objects in this container also get destroyed.

  • You need to save your project as a single file (.capx) and share this capx file. Not the .caproj file.

    Did you add Player and Explosion to the same container? Don't do it. If you destroy one object, all other objects in this container also get destroyed.

    okay let me do that

  • Man, this took me almost 30 minutes to figure out... And now I feel stupid because the answer was really simple.

    When you are checking if "Health=0" you should add another condition "System->Trigger once". Or make "Health" an instance variable of Player object, as you did with enemies.

    Otherwise this condition triggers again and again even after your player is destroyed. And your Explosion and GameOver sprites are moved to (0,0) because the system can't find (Player.X, Player.Y)

  • Man, this took me almost 30 minutes to figure out... And now I feel stupid because the answer was really simple.

    When you are checking if "Health=0" you should add another condition "System->Trigger once". Or make "Health" an instance variable of Player object, as you did with enemies.

    Otherwise this condition triggers again and again even after your player is destroyed. And your Explosion and GameOver sprites are moved to (0,0) because the system can't find (Player.X, Player.Y)

    WOW this actually worked. i didn't see that before. thank you very much mate

  • okay so i have another question. whats the easiest way to change the appearance of one sprite into another by collision? for example, my player walks into the object and then player becomes that abject. ive looked at the animation way buy seems complicated also perhaps spawn but yet still not 100%

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)