The for loop freezes the unreal editor

having this for loop freezes the unreal editor when someone is killed it seems like.forloop

i tried leaving it on for a few minutes and somehow it was gone from the task manager itself.
i assume the only other culprit would be the function the for loop is suppose to run.
isdeath

i tried using different names for my functions and classes cause i thought it would help me learn better so to clarify
PewPewDude = ShooterCharacter
LeDroid = ShooterAIController
IsDeath = IsDead

That is an infinite recursive loop when Dude != nullptr I believe you meant to do

Dude->IsDeath();

What you current have is calling the function you’re defining over and over again forever (well, until you blow up the stack).

thanks it worked, i put return IsDeath(); instead if Dude->IsDeath(). what i don’t understand is why the editor would disappear from the task manager though

The OS probably killed it.

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

Privacy & Terms