Basic C++ Questions

Hello.

First of, you need access to your FPSProjectile object.
If it’s spawned dynamically and FPSCharacter just can’t have pointer to it, you can use level actors iterator to find your projectile and then call or access any FPSProjectile members. If you spawn it within FPSCharacter, you can store pointer to projectile and then use it when needed, make sure you check it against null all the time you’re trying to access it, since projectile could be destroyed by the time you access it.

Pseudo-code:


Output()
{
    Projectile* Proj = FindActor();
    PrintString(Proj->getValue());
}