L

Proper Output

Lebbl

This is just a short question. Are both battlers supposed to be taking 0 damage? If not, might there be a common mistake that would be causing this?

Here is a google drive link to my project at this point(Godot 4):

https://drive.google.com/file/d/1gNuNFLCVDAl7hXkzQho71irNmsUR5OC3/view?usp=sharing

  • Nathan Lovato replied

    The battlers should take damage here. In the Hit script, in its _init() function, you've inverted the function parameter and the member variable, so the code is not changing the value of the damage member variable. Notice how you assign to the function parameters _damage and _hit_chance instead of assigning to the versions without the leading underscore.


    1 love
  • L
    Lebbl replied

    Thanks for such a quick reply! For some reason I'm seeing variables with leading underscores as having a "this" keyword from Java or C++ or "self" in godot instead of being pseudo private. 

    Cheers!