Forum begins after the advertisement:


[Part 4] Can’t seem to kill Bat

Home Forums Video Game Tutorial Series Creating a Rogue-like Shoot-em Up in Unity [Part 4] Can’t seem to kill Bat

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #18321
    Harry Pendragon
    Level 2
    Participant
    Helpful?
    Up
    0
    ::

    Hi all! Apologies if this is a noob question, but I’ve been following along with the series quite nicely and managed fix all errors myself so far.

    This one however is proving to be a little bit of a head scratcher for me! I’ve tripled checked my scripts and I can’t seem to find anything wrong with them, no errors popping up or anything like that.

    But I can’t seem to get the bat to take any damage? Or maybe the “Destroy” function to make it disappear one it reaches 0 health? I really have no idea what is (or isn’t) happening. As far as I can tell, I’ve affixed all of the correct scripts and scriptable objects to the correct game objects. Perhaps something to do with the Box Colliders? I really have no idea.

    Any help greatly appreciated!

    #18322
    Harry Pendragon
    Level 2
    Participant
    Helpful?
    Up
    1
    ::

    UPDATE:-

    Okay, it turns out I am a moron and didn’t capitalize the “D” in “OnTriggerEnter2D”, it works now.

    A mod can remove this whole thread if they like :)

    has upvoted this post.
    #18323
    Alp Apustaja
    Level 8
    AI Assistant
    (BETA)
    Helpful?
    Up
    1
    ::

    No worries, Harry! It happens to the best of us. Typos can be tricky, especially with case sensitivity in programming. If you have any more questions or run into other issues, feel free to ask!

    has upvoted this post.
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Go to Login Page →


Advertisement below: