even if i compiled correctly and shoot to towers or get shooted by towers, death is not occuring.
when compiled , havent showed any error
Can you share a screenshot of the script that you used for this, that would be helpful, so that I, or others can solve it, thanks
can u tell me what sort of?
1.All the screen shots of scripts till 141 lec
or
2.only scrnshts of scripts used in according to 141 lec
or
3.Only scrnshts of parts of codes i have input according to 141 lec
can u specify any idea, thank u
Just where the error is coming from so that when the master problem solvers and TAs come around they can help out, I do unity but if you have your scripts ready, a person would be able to help you the moment they see thus
BasePawn.cpp
BasePawn.h
Tower.cpp
Tower.h
Projectile.h
Projectile.cpp
ToonTanksGameMode.h
ToonTanksGameMode.cpp
HealthComponent.h
HealthComponent.cpp
Tank.h
Tank.cpp-1
Tank.cpp-2
Pls, Sry for late
pls, could anyone help me, otherwise i couldnt continue my lessons
Have you tried adding logs in various places to see where it’s going wrong?
nope, can u tell me how to do it
How to add logs? That should have been covered already
UE_LOG(LogTemp, Warning, TEXT("This is a log")
then use that to debug the control flow, what’s being called? What isn’t? What conditions if any aren’t being met? e.g. in the DamageTaken function
UE_LOG(LogTemp, Warning, TEXT("DamageTaken called")
if (Damage <= 0.f)
{
UE_LOG(LogTemp, Warning, TEXT("returning due to Damage <= 0.f")
return;
}
if (!ToonTanksGameMode)
{
UE_LOG(LogTemp, Warning, TEXT("ToonTanksGameMode is nullptr!")
}
else if (Health <= 0.f)
{
ToonTanksGameMode->ActorDied(DamagedActor);
}
etc. and so so at other points that lead to the pawn death, find out where it’s not going as expected.
ok, thanks