Game Modding | Call of Duty: Black Ops 3 | Scripting
ModmeBot:
Thread By: alexisloic21
hello
if i put my condition_script in PlayableAreaBehavior it will be executed when a player is in PlayableArea ?
because i do melee behavior but don't work
BT :
{
"type": "parallel",
"id": "MeleeAttackBehavior",
"children": [
{
"type": "condition_script",
"id": "shouldMeleeAttack",
"scriptFunction": "shouldMeleeAttack"
},
{
"type": "action",
"id": "shouldMeleeAttackAction",
"ActionName": "shouldMeleeAttackAction",
"ASMStateName": "melee@panzer",
"loopingAction": 0,
"actionTimeMax": 0
}
]
},
if( !IsDefined( entity.enemy ) )
{
IPrintLnBold("false");
return false;
}
if( DistanceSquared( entity.origin, entity.enemy.origin ) > 12544 )
{
IPrintLnBold("false");
return false;
}
if( IS_TRUE( entity.enemy.usingvehicle ) )
{
IPrintLnBold("true");
return true;
}
yaw = Abs( zombie_utility::getYawToEnemy() );
if( ( yaw > 45 ) )
{
IPrintLnBold("false");
return false;
}
IPrintLnBold("true");
entity.melee_attack = 1;
return true;