ppppain's Forum Posts

  • 7 posts
  • Just make it two pieces, pin a slanted end sprite onto it.

    9patch would be suitable for this as well.

    I guess that is the only solution for now.

    Thank you!

  • Hi, can't you just make it as a sprite animation in Photoshop, decrease/increase the frame number?

    That is an option I tried as well but I'm trying to avoid that if possible.

    Thank you for the suggestion!

  • Hey folks,

    Does anyone know how would you tackle this obstacle that I'm currently facing?

    I'm trying to create slanted health bar like shown below:

    The issue I'm facing is that resizing the health bar makes it almost vertical by the time it depletes completely if I start with the sprite that is slanted.

    I've tried adding a slanted cap to the end of it but it looks jittery and is probably not the right solution.

    The thing that comes to mind is using effects like source out etc... and 45 degree cube but not sure if that is even possible to block out everything except the part that overlaps the health bar

    It would be the same angle at the beginning and at the end of a bar.

    Thank you for your time and have a great day!

    Tagged:

  • Yeah, that worked perfectly.

    Thank you very much!

  • Hey people, I'm stuck on this one for a while.

    The goal is to have XP bar with lerp continue working after pausing the game (global time scale 0).

    I've tried setting the XPBar time scale to 1 after pausing the game but it still does not work. Probably because the action for lerp is in every tick event. Is there a way to use dt of the object (after I set it's time scale to 1) like every XPBar.dt seconds or something like that?

    I've also tried using the dt within the lerp itself:

    lerp(width,xpbarwidth*(xp/maxxp),XPBar.dt*4)

    But it does not work.

    The one workaround I found is adding all objects to family and setting their timescale to 0, but that raises some other problems unfortunately.

    Any help would be greatly appreciated!

  • Yup that worked perfectly. Thank you very much for your help.

    Have a great day ahead!

    This is how I implemented that:

    If EnemyHP<0

    MaxHP-HP

    Add MaxHP to TotalDmg

    Else EnemyHP>0

    DmgTaken=MaxHp-HP

    MaxHP=HP

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello good people, I'm stuck on this one. Since my game has multiple attacks, I would like for 1 event to detect how much dmg enemy took.

    Let's say for example we have fireball spell

    Fireball

    Dmg=4

    TotalDmg=0

    EnemyMaxHP=10

    EnemyCurrentHP=10

    My issue is that I would like a stat that shows total dmg dealt by fireball but not including dmg beyond 0. So if it takes 3 fireballs to kill 10 hp enemy, I would like only 10 hp added to the totaldmg stat instead of 3 x Fireball dmg = 12.

    I've tried below:

    While EnemyHp<MaxHp

    EnemyCurrentHP=EnemyMaxHP-EnemyCurrentHP

    EnemyMaxHP=EnemyCurrentHP // so I can stop the loop.

    But this one ends up going in negative, so it deals dmg like: 4,4,-2

    Is there any way to stop it calculating beyond 0?

    Any help would be greatly appreciated.

    Tagged:

  • 7 posts