staleevolution's Recent Forum Activity

  • Can you try when pressing a certain button add action of set frame to: random(0,1, 2, 3) or whatever number of frames you have? Instead of commas, does Construct allow hyphens (0-4)?

  • I went a different route and solved it. I cloned my Pixel_Hero and just spawned him in place of the Original. When he appeared he plays the "DOWN" animation. When everything restarts, all objects, Health, variables, etc. reset to normal. I might tweak it a bit down the road, but I need to move on. I appreciate the suggestions I was given from the community. Everything helps to look at it from someone else's perspective.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • AllanR I'm trying different variations. I gave a second of wait to disable the Jump otherwise anything less he is stuck in the air doing his normal jump animation, but that isn't the problem though. This is a tough one. I will keep trying. Thank you for suggestions.

  • Don't know why this didn't appear in my last post, but here is the image with health = or less than 0.

    This also shows the Pixel_Hero's current animation as it switched to Down. It has 4 frames where the last frame he is laying down. It doesn't go through any of the frames.

  • GeorgeZaharia

    Here you can see the Pixel_Health Global Variable stops at 0 (and the Health HUD in the upper left corner is black/the frame it should be). The Game then goes through the actions and restarts the layout.

    This is the image of whole health system.

    Here it is with changing the Pixel_Health to equal or less than 0.

  • GeorgeZaharia

    Cloud isn’t brining up my project on mobile. I can post a pic when home.

    I have a condition where any collision with an “Enemy” or a certain object and player isn’t flashing to Flash for 2 second.

    If player is flashing, trigger once to subtract one from Global Variable Pixel Health.

    My Health HUD is set to change frames based on amount of Pixel Health there is and that has worked smoothly and I don’t think is causing the issue.

    It’s weird because in the Debug, My player shows Down animation supposedly playing, just doesn’t actual show the player going through frames.

    I will try to post later.

    Thank you.

  • I would, but it has 2/3 of everything completed (well, except zero sound). I understand it would be easier to see the whole thing, but at this stage I can only share images. It’s the last of the animations. The loss of health and restarting layout once health hits zero works. The system plays the Down animation, just doesn’t go through the frames to view it.

    If I can’t figure it out, I may leave as is.

    Thank you.

  • I'm trying to get my "Down" animation to trigger when Health is at Zero. The Restart Layout and so forth actions work, but the animation does not. When I go to debug, it shows the "Down" animation is playing in the system, but in the preview it is not. I've tried various methods to get it to work, but have failed at each turn (I even went and sped up the Down Animation hoping it would trigger as well as add a Wait Action for 0.1 to give the system a chance). Anyone have a guess as to why it is not working? (My player is set to the PF_Movement sprite object which has the Platform behavior). I've even tried it without Event 102.

    Thanks!

  • Give the objects solid behavior and the ones you want player to collide with or be able to stand on keep solid behavior enabled. You can clone the same objects by right clicking on it on Project tab to make a clone. Then disable the clones solid behavior so you can interact or go through them.

    Another way, might be to change the collision points of the object in the Editor window.

  • This might work:

    Add an Event: Is Player on Collision with another object (Enemy) (Just using Player and Enemy as Example Objects you can create)

    Add a Sub Event: Health (Animation Sprite you created) - Compare Frame < (less than) 4 frames (or whatever number of frames you have.

    Add Action: Health sprite: Set Frame - ok type in the white field for Frame number: Health.AnimationFrame +1

    (I said Health as that is the name I gave the health bar sprite. If you have it a different name, you have to use that. It should auto appear as you type same with AnimationFrame.)

    One Event. Try it. Good luck.

  • By chance did you import a massive tile sheet or sprites?

  • What I’ve done similar to what you mentioned is create a health bar sprite of 3 frames. Frame 0 Has 3 Full Red Hearts. Frame 1 has 2 full red hearts. Frame 2 has 1 and frame 3 has blank or no hearts.

    Then set Frame Speed to 0 so the animation doesn’t cycle through.

    In the Event Sheet, I created a Global Variable calling it Health.

    An Event was created that when I got attacked or set to is Flashing I subtracted 1 from the Health Global variable.

    The next event I set the Compare Value.

    If (Global variable) Health = 3 - Add action: Set the Health sprite Frame to 0

    Then created repeating events:

    If Health = 2 set Health sprite Frame to 1

    Health = 1 set sprite frame to 2

    Health = 0 set sprite frame to 3

    If Health = 0 add action: Restart Layout or whatever you intend to do.

staleevolution's avatar

staleevolution

Member since 9 Sep, 2014

None one is following staleevolution yet!

Trophy Case

  • 10-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies