Forum begins after the advertisement:


[Part 10] When I collide with the boss, player doesn’t take damage

Home Forums Video Game Tutorial Series Creating a Metroidvania in Unity [Part 10] When I collide with the boss, player doesn’t take damage

Viewing 4 posts - 16 through 19 (of 19 total)
  • Author
    Posts
  • #14392
    Joseph Tang
    Level 13
    Moderator
    Helpful?
    Up
    0
    ::

    We’ll need to come up with a different way to create this mechanic, but the simplest solution is going through all the “Boss_” scripts for their attacks and call the end of their function/methods if they touch the wall rather than set ResetAllAttacks(). This is because ResetAllAttacks() doesn’t stop current attacks but rather allows for another attack to be called after another one has ended.

    So if I want to stop my dive attack, I’ll need to do the same compartag code in the Boss_Dive.cs, then I’ll have to tell it to set the current animation and paramaeter to false, turn off the diving collider, call resetattacks. etc.

    As for the Slash() animation, i’ll similarly have to look into it for a better solution. However, for now, I will only be able to recommend the same suggestion.

    #14393
    Elvin Sim
    Level 10
    Participant
    Helpful?
    Up
    0
    ::

    I don’t want to stop the dive attack just want when the boss is casting the skills, player’s attack wouldn’t stop the boss for casting

    #14396
    Elvin Sim
    Level 10
    Participant
    Helpful?
    Up
    0
    ::

    Ok, for the : “I don’t want to stop the dive attack just want when the boss is casting the skills, player’s attack wouldn’t stop the boss for casting” is fix now but the boss bounce attack() still cannot find a solution

    #14406
    Joseph Tang
    Level 13
    Moderator
    Helpful?
    Up
    0
    ::

    The dive attack is just an example, not the specific thing i’m targeting. I’m using it as an example to show that you can swap out Dive for anything you want to stop… say the bounce attack you want to stop. Or perhaps Outbreak. Or anything that doesn’t need to only be Dive.

    I still do not quite understand what you want with the casting part? I assume you mean you want to have the player prevent the boss from making the attack when they are being hit by the player? If so, I’m not quite sure if that will be the best choice for the Boss as the player can spam the attack on the Boss and prevent it from committing anything in defense, especially when the Boss doesn’t have parries in Phase 3 & 4.

    In short: Use the Dive example i provided earlier and test if it works for your Boss Bounce attack or others.

Viewing 4 posts - 16 through 19 (of 19 total)
  • You must be logged in to reply to this topic.

Go to Login Page →


Advertisement below: