How do you get AI to use turrets? I got the turrets to work for the player but i cant get the AI to use them. even when i tell them to target it they run to it but dont use it,
This is a function inside of the utility for the ber2 map which is the "Eviction" mission
Code Snippet
Plaintext
// Will force an AI to use a turret // Guy - Ai // Turret - turret to use // ender - what level notification will stop this thread //This should be called using thread* guy_stay_on_turret( guy, turret, ender ) { if( IsDefined( ender ) ) { level endon( ender ); } turret endon( "death" ); guy endon( "death" );
This is a function inside of the utility for the ber2 map which is the "Eviction" mission
Code Snippet
Plaintext
// Will force an AI to use a turret // Guy - Ai // Turret - turret to use // ender - what level notification will stop this thread //This should be called using thread* guy_stay_on_turret( guy, turret, ender ) { if( IsDefined( ender ) ) { level endon( ender ); } turret endon( "death" ); guy endon( "death" );
This is a function inside of the utility for the ber2 map which is the "Eviction" mission
Code Snippet
Plaintext
// Will force an AI to use a turret // Guy - Ai // Turret - turret to use // ender - what level notification will stop this thread //This should be called using thread* guy_stay_on_turret( guy, turret, ender ) { if( IsDefined( ender ) ) { level endon( ender ); } turret endon( "death" ); guy endon( "death" );
Any AI reference can be passed into the function, as well as the turret variable
I want to point out that these functions and scripts for AI are set up to be more generic than the ones for zombieMode. They weren't designed so people can just call a beginning function and the script runs and handles everything for you, they require you to program the logic behind these supporting functions.
Than being said it maybe possible to automatically link a guy to use a turret and that be the only thing he does, but idk.