How to play animations by code?

What role does ‘ bLoop ’ play??? When using it, can I change it to ’ false ’ and ’ true ’ when I’m not using it?
Do I have to change it idle to 'true ’ when I change it from Attacking?
(Attack->idle)

//YourCharacter.h
UAnimSequence *Anim;

class YourCharacter : public ACharacter
{

UAnimSequence *Anim;

...

}
//YourCharacter.cpp

AMyProject3Character::AMyProject3Character()
{

static ConstructorHelpers::FObjectFinder anim(TEXT(“AnimSequence’/Game/Mannequin/Animations/ThirdPersonJump_Start.ThirdPersonJump_Start’”));
Anim = anim.Object;

 ...

}

Playing animation:

  1. bool bLoop = false;
  2. GetMesh()->PlayAnimation(Anim, bLoop);

this code!