Just wondering how i could improve these bool checks for my Behaviour tree class, what checks or other functions could i implement to improve these choices this is no where near done just wanted to see if i was on the right track
if(bInRangeRed() && bRedplayer == true)
{
if(bBallPossession == true)
{
bMoveToGoal = true;
}
elseif (bBallPossession == false )
{
bNoBallPossession = true;
}
elseif(bNoBallPossession == true || bTeamPossession == true);
{
bBlockDefenders = true;
if(bNoBallPossession == true || bTeamPossession == false);
{
bMovetoBall = true;
}
}
}
//Blue team behaviour for Defending ball
if(bInRangeBlue() && bBlueplayer == true)
{
if(bDefendBall == true)
{
bMovetoBall = true;
}
elseif (bBallPossession == true && bClosestBlue == true)//if a red player has the ball and is the closest blue chase him down like a mofo
{
bChase = true;//chase red player in possesion of ball
if (bNoBallPossession = true);//if no one has the ball either defend the ball or chase a red player
{
bDefendBall = true;
bNearestRed = true;
}
}
}