brainwavecreations's Recent Forum Activity

  • Thanks again lionz! The bug that has plagued me off and on for a couple weeks, is finally sorted! 😃 What a great feeling it is, when you finally figure out what is going wrong, and mucking up a feature in a project.

    I'm learning more and more, how particular Construct 3 is, with the processing of conditions/events from top to bottom. All, I needed to do was delete one entire Event Block, which was unnecessary. Then add a couple more conditions to an OR Block, which checks the PlatformEnemy's state, then sets them each back to "Walking" through a Sub-Condition that checks to see that it is NOT in states "TakingDamage", "Death", and has lost the LoS to the PlayerBox.

    The real clinch, was making sure the check in the parent Block. The one checking to see if PlatformEnemy is in various Attack states was checking states in the proper order. I had all the state checks in there, and still wasn't working properly. Then I moved the check for the "Attack" state, above the "RangeAttack" state check, followed by a "SayNo" state check condition. That last one is used by the Sensei, who takes no damage, and simply wags his head no at the Player.

  • I've got it mostly fixed at this point. I had to just delete a few event blocks. The only issue now is my ninja enemies are not moving back into Walking after they change their attack, or ranged attack state/animation.

    I'm happy with the progress with this bug. It's been irritating me for a while now. But, time for some rest and sleep. I'll tackle the rest tomorrow afternoon.

    Thanks again for all the help lionz. You pointed me in the right direction for sure. I was looking in the totally wrong areas of my Event Sheets.

  • I'm sorry for all the confusion. I'm always super helpful for you trying to help me out lionz. You have no idea haha. I often have trouble conveying concepts, and the way I sort things out in my head into words... Even in conversation.

    It's the state that is not changing, and that means, the animation for that state does not play when it should, during those types of attacks. I update the animation every tick to match what is currently held in the variable, "PlatformEnemyState".

    I think you are absolutely right. It may be LoS like you just said. Actually, now that I type that. I think I may know right where the bug lies. I'll be back later. Thanks so much for all of your time and help again lionz

    I'm the type, to almost never reach out for help, even in real life. But, when I do. You have no idea how much I appreciate it when someone does their best to do so.

  • Basically. When the player attacks using melee or a bullet it works just as desired. I also added that wait 0.1 as a test, and removed it after uploading the screenshots.

    So, with a melee attack, the first attack makes the enemy flash, while playing the "TakingDamage" animation. Then moves back into "Walking" state, or the "Attack" state if the Player is within a set range. Then on the second attack, the enemy fades while playing the "Death" animation(as health reaches 0). Then gets destroyed at the end of the fade behavior(in the behavior preferences). Just like it shows in the EnemyDamage function in the screenshot.

    But.. When I perform the slide attack as in the second screenshot. Where it shows PlayerBox on collision with PlatformEnemy in either "JetpackSliding" or "Sliding" PlayerState. It does everything except play the proper animations. So the first hit with a slide attack. The enemy flashes, loses one health, while moving back into Walking or Attacking animation instantly. On the second hit, the enemy fades while moving back into the Walking state(which are the enemies default state). If player is within range they will go back into Attack state. The Walking, and Attack states are called depending on the distance to the player, and LoS.

    So everything is working as it should. Except the "TakingDamage" animation for that state on the first hit of a slide attack, and the "Death" animation for Death state on the second hit of a slide attack do not play their related animations. They flash, lose health, fade, and destroy at the end of the fade. But, do not play the animations that corelate to their HP values, and the state the function puts them into. But, they do play the animations perfectly fine if hit with the Melee Attack HitBox, or a Bullet object.

    It's really strange to me, because I am using the exact same function. And, as you can see in the second screenshot. I am calling the function the exact same way regardless if it is the Melee Attack, or the Sliding Attack. Animations work just fine for the Melee Attack(and a bullet as mentioned, but not in screenshots), but not for the Sliding Attack, or one other attack. And, I'm calling them in the exact same way. Works for one, but not the other.

    I'm not sure how else to explain it.

  • While using the sliding attack(regular or with jetpack), as well as colliding with enemies with invincibility active. The outcome is: During the first hit, the enemy flashes but goes back into attacking/walking state & animation depending on the usual conditions for those states. During the second hit, the enemy fades while going back into attacking/walking state & animation.

    The function itself works flawlessly for melee & ranged attacks(melee using a spawned hitbox, the ranged being a bullet object), but not for the Sliding attack, or when enemy is taking damage while the player has the invincibility power-up active. To me it seems to be an issue with conditions where the PlayerBox is colliding with the enemies. Either while sliding/jetpacksliding, or while colliding with the invincibility mechanic active.

    The only hitboxes being used is one for the player attacks, then another for enemies' attacks. The ranged attack uses a bullet object for collision. For Sliding Attacks, and Invincibility it's using the PlayerBox. Which has the animated Player as a child laid overtop. The Player itself has collisions disabled, and all collisions are handled by the PlayerBox. the PlayerBox colliding with the enemy during one of two sliding attacks, or during the invincibility power-up is calling the EnemyDamage Function for those two(which are having the issue of not holding the enemies in the proper animations).

    As pictured. I used Trigger once in the Function, as well as a Collision check for the PlayerBox, rather than an Overlapping check. To not have the action performed twice right after each other. Even so, if that was an issue the Melee attack hitbox lingers for 0.2 of a second. Which would be about the time than it takes to slide past an enemy, or run right past them with invincibility activated.

    I've been picking away at this small bug, here and there for a while now. I can post images of entire event sheets if that is more helpful. I'm about to get on for an hour and a half live stream I host every night, in 15min. But, can check back here afterwards.

  • That's for your input alextro

    What is strange is that it works just fine for the melee attack. And, not the sliding attack, or with invincibility. Both TakingDamage, and Death animations play fine on melee attack hitbox collision, and not the other forms of damage(where PlayerBox collides with the enemy(as in sliding or invincible).

    The sliding attack takes off the same amount off of Health variable as the melee attack. So it's not equaling 0, until the second hit of either melee or sliding attack.

    When it reaches 0 on the second hit of a melee attack it plays the Death animation, while fading as it should. I would think both collisions would work in the same way. As they are essentially doing the same exact thing. Running the function, and taking 1 off of the health variable.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello everyone :)

    I'm having a spot of trouble pinpointing the issue with a bug in my main project right now. I've created an EnemyDamage Function. It should put each Enemy into a state/animation of being damaged if health is above 0, or a state/animation of death if health equal or below 0 and fade.

    It works fine with my Player's melee Attack. When the hitbox overlaps the enemy, they go into their proper animations, and flash, or fade depending on the level of health variable.

    But, if I do the Player's Slide attack into them pictures below, it does not put them into the proper animation for that state. I also have an invincibility pickup for the Player. When the Player runs into any of the PlatformEnemy objects it calls the same function, except takes off 2 health(which puts the enemies health to 0. That also does not work as intended. And again, it's a condition where the Player Box collides with the enemy, with a boolean for invincibility set to true.

    So it seems to be an issue with the Player Box(in particular states) colliding with enemies, where the animations do not change properly on the enemies.

    Screenshot of EnemyDamage Function: EDIT: Please Note: The Wait 0.1 Seconds, and Stop Animation, were put in to try and fix the issue, before taking screenshot below.

    Screenshot of a the Sliding & Melee Attack calling the Function above:

    As always. Any help is greatly appreciated! Thank You :)

  • Sure thing . I often over complicate things too. To the point I can't figure out what I've done wrong XD. Best, to keep it super simple, and work up from there.

    There are a ton of resources online as well, between YouTube and other tutorials on the Scirra website to figure out what's gone wrong. In this case, I just removed most of the Events, and set up something super basic that will work.

  • Not sure if this is at all what you are looking for. But, I made use of your second Event Sheet. And, really simplified what you had going there.

    I set the main layout to "Main Screen" on the project. Depending on whether in Main Screen, or Game, it will play and stop different music tracks when the button is pressed to play or stop.

    dropbox.com/s/10tbe8h93xc2kji/Sound.c3p

  • You do not have permission to view this post

  • You do not have permission to view this post

  • Thanks for the feedback alextro. I've been studying the c3p from that post. Trying to make it work with my instance here. The differences in distance already have been working for the different Range and Melee Attacks for these enemies.

    I'm trying to incorporate this idea into the actual range attack. I'm going to make some changes to the c3p example. I keep getting confused with the bool and sprite's animation both called active XD. To see if that helps me make sense of this.

brainwavecreations's avatar

brainwavecreations

Member since 17 Aug, 2021

Twitter
brainwavecreations has 8 followers

Connect with brainwavecreations

Trophy Case

  • 3-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x6
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x2
    Lightning Draw First person to up-vote a new Construct 3 release
  • x2
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

12/44
How to earn trophies