Bump timer:
Bot I'm not sure how much can be a Bot mentally "accelerated", but... if we are speaking about some behavior in certain map, one of factors which might "change their mind" toward navigation is another "PathNode" with special considerations and making it to look smarter even it's the same dumb bot since forever:
Code: Select all
class TouchNode expands PathNode;
var bool bTouched;
var() float BlockTime;
event PostBeginPlay()
{
InitialState='BlockTouching';
SetCollision(True,False,False); //Made sure about enabling touch
RemoteRole = ROLE_None;
}
function Touch(Actor Other)
{
if ( !Other.bIsPawn )
UnTouch(Other);
if ( Other.bIsPawn && !bTouched )
{
if ( Playerpawn(Other) == None )
bTouched = True;
GoToState('BlockTouching','Touched');
}
}
state BlockTouching
{
Goto('Begin');
Touched:
Disable('Touch');
if ( bTouched )
ExtraCost=100000000;
else
ExtraCost=0;
// log(Self.Name$" >> Extracost="$ExtraCost);
Sleep(BlockTime);
bTouched = False;
Enable('Touch');
Begin:
ExtraCost=0;
// log(Self.Name$" >> Extracost="$ExtraCost);
}
Class might not be bStatic (False) and bCollideActors is True, various tests can be confirmed by Logs - in testing sessions.
What does it do. If it's placed around shortest cross-roads, touching Bot will cause a route lock-down, next Bots coming a bit later are picking another way because this one can stay locked for a desired configurable by mapper time (I used 15 seconds).
Misc: For visual entertaining debugging here can be used Skins from Botpack, Red when Node is locked, Green when Node is unlocked or edited textures with meaning of a traffic-light...