Help me understand these references/variables a bit better

In this example, Current Locked On Target ID will be an actor that is definitely a BP_EnemyBaseClass or child of one.

The second variable is self explanatory. The second one was made by casting, and it allows me to grab a variable that I need.

How can I get the first variable to perform the same way as the second?
why

Seems like CurrentLockedOnTargetID is of type Actor so a cast is needed to BP_EnemyBaseClass to access its data.

If you want both to behave the same then both variables should be of type BP_EnemyBaseClass.

Makes sense?

1 Like

See thats all I needed, Ive been reading this stuff for hours and I just needed it said a certain way. Sure enough, its drawing to my screen now, I didnt realize that I needed to throw my Target ID into the cast and then it would act correctly…thank you.

To avoid making another thread, is there a quick solution to getting my hud to update the stat value? I have to retarget it after shooting it to get a correct health value, but Im not sure what the most cost effective way is for doing that.

I suggest you create a new thread since you’ll need to post the BP.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.