At some point I somehow broke the health of the base going down. I’ve checked previous lectures and compared code several times and don’t know what happened. Also the end game color rect is always visible. I’m lost. The previous images are enemy.gd and base.gd respectively.
Hi NeoSpace413,
My first question is that print statement in base.gd appearing in the console?
If it is then we at least know that take_damage() is being called correctly, if not then we need to backtrace it to see why not.
If i remember correctly we link the take_damage() method as a call in the TakeDamage animation so it the method is not being called we should be checking there to see if for some reason its lost that link
If you can update me on this we can start tracing the issue
Correct. The print statement is not working so I know it’s struggling to be called. The function names look the same though for take_damage() and base.take_damage(). I’ve also made a reference to it in the enemy.gd.
I suspect that on line 26 that the progress_ratio is not reaching 1.0.
I would check in the inspector in the enemy scene on the root node that the exported speed variable is not set to 0.
Speed is set 2.5. I also suspect that the issue is in the progress ratio not running properly but I don’t see any discrepancies in the code. I’ve also double checked lines of code where we instantiate the new enemy instances.
Figured it out. Must have accidentally told it to loop in the Path3D node at some point without realizing it so it was doing that instead of the take_damage() function.
Nice spot and getting it working
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.