leoncross's Recent Forum Activity

  • Yikes, I forgot to use dt! Gonna check it again now.

    The problem was that the Player changed speed while Jumping, causing some weird "bumps" when jumping even without the button held.

    Also some other method made the Player have almost no momentum while Jumping if his speed was 0.

    Hmm, the classic bug that allows the Player to retain their speed by jumping constantly still happens with your suggestion... )-:

  • Hello!

    I'm trying to fix this weird bug in my game and I'm having no luck so far.

    In this game, holding down the Left shoulder gamepad button and moving Left or Right sets your max speed to 300. Normally the value is 200. It also lowers your acceleration and deceleration making the player harder to control, like playing Luigi in Super Mario Bros.

    When the player's speed reaches its maximum point, it sets the Player's Jump Strength to 500 (Normally it's 465) enabling the player to jump higher(This is just for information, it's irrelevant to the problem).

    When the shoulder button is released, a function is called that sets the Player's acceleration and Jump Strength to normal.

    However, I wanted the Player's Max Speed and Deceleration to smoothly transition from the "Running" value to the "Normal" value.

    I tried an event with Every Tick and lerping the Player's Max Speed if the button is not down and the Player's Speed is greater than 200 and it seemed to work at first.

    But, to make this work, I had to disable it when the Player is jumping or falling because it caused other problems.

    That however, makes it possible to stop pressing the shoulder button and keep jumping to retain speed even when the button is not pressed.

    I think the fact that jumping de facto increases the Platform Speed is the core of the problem.

    I've tried many other ways but each one produced its own problems...

    Well, I hope I did an adequate job of explaining this, haha...

    Please ask me if anything is unclear.

    I can't think of any other way to fix this... I'd be grateful for any ideas...

  • Awesome plugin!

    But is there a way to make the Fade Out With Delay transition faster?

  • kriand

    Wow, you did it! Though the other method worked fine, the code is much cleaner. I incorporated the damage part and it works great!

    I even added the ability to stop the sine behavior on the dark hearts.

    I'll try adding the healing events and the Max HP powerups.

    Nice idea though, I thought of putting an index variable but I hadn't thought of matching the index of the heart sprite with the Player's HP...!

    Excellent!

    Thanks for making this!

  • kriand

    facecrime

    Hey guys, Destroy on its own did not work, but I incorporated the idea of having the dark heart

    under the colored ones and used this:

    Player Health Points =/= HUD_Hearts.Count

    Hud_heart Pick furthest to (0, 24)

    Repeat Player.Health.LastDamagePoints times

    Every tick

    It works great! At least with some preliminary testing.

    The hidden dark hearts still show though, I may have to play a bit with their visibility.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • kriand

    Yes, I'd like to avoid making so many "animations", as accounting for all the possibilities will take a lot of tedious work.

    However, if all else fails, I'll do it that way, haha...

    The thing is every Heart sprite has a nice Sine effect which I think would look weird if all Hearts are one Sprite.

    facecrime

    Hmm... Nice idea with the tilemap, though it would break my Sine effect too. I'm also drawing the hearts a bit closer to each other that the tilemap would allow I think.

    I like your idea of having a black heart under the red ones (Well, blue in my case). I'll try destroying the furthest red heart sprite and see if that works.

  • Hello guys,

    I'm having some trouble with the Player Health HUD.

    The concept is this:

    The Player's Hit Points are represented by Hearts. Each Heart is a different Sprite.

    The Player can purchase Items that increase his Max Health to a maximum of 8.

    He starts with 3 though.

    Every time he gets hit, the Heart that is furthest from the point 0 in x gets dark (Animation change.)

    I managed to accomplish this and it works great when the Player gets damaged by 1.

    If damaged by more than one though, the system falls apart and only shows one damaged heart from then on.

    I've tried doing it by my own functions and Dictionary and by using the Health behavior bought from the Scirra Store with no luck.

    Here is what I'm doing:

    [Creating the Heart Sprites]

    On start of layout

    Repeat.Player.PlayerMaxHealth Times -> Create object HUD_Heart on layer "HUD" at (40 + (loopindex * 14), 24)

    [Damage]

    Player - On Health Damaged

    HUD_Hearts - Pick furthest to (0,24)

    HUD_Hearts - Is animation "Default" playing

    Repeat Player.Health.LastDamagePoints times (Health behavior includes value for the last damage received)

    ->

    Set animation to "Dark"

    (Wait 0.5)

    So, do you have any ideas? As I've said it works fine until the character gets damaged for more than 1 HP.

    I've tried various variations on the above logic yet nothing changed.

    I'm quite new to Construct though so maybe I'm missing something?

  • I see. Thank you.

    I've decided to get it on Steam.

  • Hello!

    I'd like to purchase a Personal License but I have a question.

    Does the Personal License include a Steam code to activate the Engine on Steam?

    I like having it there but I'm also interested in purchasing the "Beginner Pack 2" bundle which is only available to this site.

leoncross's avatar

leoncross

Member since 14 Feb, 2018

None one is following leoncross yet!

Trophy Case

  • 6-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

9/44
How to earn trophies