rbailey83's Recent Forum Activity

  • You don't need animation frames for different angles. Just keep one frame with the ship facing to the right.

    Then use Enemy1->Set Angle action to rotate the ship to the same angle as your Bullet.AngleOfMotion

    Or you can set "Set Angle=Yes" in Bullet behavior properties and it will fly in the direction of the sprite, i.e. you will only need to change sprite angle. Bullet angle of motion will be changed automatically.

    dop2000 awesome thank you so much! knew it had to be something simple, guess i was over complicating it. Used the second method and worked like a charm, which of course i'm sure you knew it would

  • I have setup a guide path for an enemy ship to follow on spawn. Hits the first guide and goes up, second guide goes left and third guide goes down. Hitting the guides works just fine, but the direction the ship is facing does not work going up or down. It enters the layout facing the right direction and is facing the right direction when the ship hits the second guide point moving it to the right. Any suggestions on what I am doing wrong to get the ship to face up on hitting the first guide and face down hitting the third guide point?

    I have tried rotating the enemy ship to different points in the animation as well but the up and down does not change no matter what rotation position i put it to in the frame.

    I have setup animation frames for each direction by rotating the image clockwise for each direction.

    This is the event sheet section

    This is the layout

  • never mind i see my error, i had the variables in wrong order for the every tick, lol i had been looking over those three event lines for a while don't know why that didn't pop in sooner

  • I am using lerp for the health bar so that when the player upgrades their health, the amt of health can increase but the health bar width will stay the same. What happens though is that when the player gets damaged the health bar width is increasing instead of decreasing. Here is some screenshots of what I have setup for the lerp, using maxHealth for the global variable that will change with the upgrades and inst_maxHealth for the instance variable to transfer the value to and have another instance variable inst_health that is set to the health bar width.

  • Check that you player's health and fullHealth are the same at the start of the game.

    Actually, you don't even need lerp (I like it so much I use it everywhere ), this formula is easier:

    bar.width=110 * (player.health/player.fullHealth)

    dop2000 yep that did it, the health was initially set to the 110 but for some reason it got reset to 0. Put it back to 110 and it worked like a charm.

    haha I like the lerp so I think I'll keep it in there and get used to using it. Thank you so much for the help, you've been awesome

  • Ok so the section on the lerp kinda made sense to me, that makes things really easy lol.

    One thing though the health bar width at start of game is just a little bit shorter than the width of the 110, or at least what it shows at 110 in the editor. I double checked the width of the health bar and it is 110

  • You can use lerp function.

    Healthbar -> Set width to Lerp(0, 110, (player.currentHealth/player.maxHealth))

    So, for example if player.maxHealth=130 and currentHealth=65, then the healthbar.width will be set to 55px

    dop2000 Ok cool thank you. I am not familiar with Lerp so I will look that up in the manual and do a little reading on that. Appreciate the help

  • So using a health bar in a game and have it setup for the health bar set width to player instance health variable.

    the health value is set to the same width of the health bar width.

    What I am wanting to do in the game is allow the player to upgrade health to give them more health. How do I do this yet keep the health bar the same width?

    So the width is 110 and the health value is 110, if player does the upgrade and say adds 20 health the health value changes to 120 but I need the health bar width to stay at 110

  • tarek2 I hadn't even noticed that, I had just quickly taken a look and ran the project to see the outcome, hadn't tried implementing it or studying it yet so you beat me to that. I did update it in the sample project that you gave me. Thanks for that!

    Def a good thing to take a break for a while and when come back to the project just quickly check things over again with a fresh mind.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • zenox98 oh sorry, yes using chrome. I didn't think about a browser problem since the only time it happens is running the construct 2 project so that thought didn't even enter my mind. Just another reminder not to assume things lol. Thank you

  • tarek2 I apologize for not responding sooner, I haven't been feeling well the last few days. The events 20 and 21 I didn't actually have them in at the same time when I was testing, I just put them in for the screen shot to show the two ways that I had tried to do the < 0 health event is all.

    Ok i think I get what you mean, I created a new event for the fight that was outside the event where the tile that called the detection and spawned the enemy, so it is no longer dealing with the reference point for the tile id that actually spawned the object.

    I feel like an idiot, that is so obvious now after looking at the example project you posted. And thank you for that by the way. If i could recommend you for some kind of forum award for being helpful I would definitely be doing that.

  • so when i run a project to test it the project comes up fine in one tab but it also opens a second tab with this page:

    this just recently started, why is is doing that and how do i get it to stop?

rbailey83's avatar

rbailey83

Member since 22 May, 2017

None one is following rbailey83 yet!

Trophy Case

  • 7-Year Club
  • Email Verified

Progress

8/44
How to earn trophies