mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-04-23 06:15:43 +00:00
helicopter timers
This commit is contained in:
parent
484a25a81b
commit
8cddf2532f
@ -553,3 +553,6 @@ set scr_emp_duration "60"
|
|||||||
|
|
||||||
// _helicopter
|
// _helicopter
|
||||||
set scr_helicopter_allowQueue "0"
|
set scr_helicopter_allowQueue "0"
|
||||||
|
set scr_helicopter_cobra_duration "30"
|
||||||
|
set scr_helicopter_pavelow_duration "30"
|
||||||
|
set scr_helicopter_apache_duration "30"
|
||||||
|
@ -1,3 +1,24 @@
|
|||||||
|
/*
|
||||||
|
_helicopter modded
|
||||||
|
Author: INeedGames
|
||||||
|
Date: 09/22/2020
|
||||||
|
|
||||||
|
DVAR:
|
||||||
|
- scr_helicopter_allowQueue <bool>
|
||||||
|
true - (default) allows a helicopter to be queued when air space is full
|
||||||
|
|
||||||
|
- scr_helicopter_cobra_duration <float>
|
||||||
|
40.0 - (default) the amount in seconds the helicopter will fly around for
|
||||||
|
|
||||||
|
- scr_helicopter_pavelow_duration <float>
|
||||||
|
60.0 - (default) the amount in seconds the helicopter will fly around for
|
||||||
|
|
||||||
|
- scr_helicopter_apache_duration <float>
|
||||||
|
40.0 - (default) the amount in seconds the helicopter will fly around for
|
||||||
|
|
||||||
|
Thanks: H3X1C, Emosewaj
|
||||||
|
*/
|
||||||
|
|
||||||
#include maps\mp\_utility;
|
#include maps\mp\_utility;
|
||||||
#include maps\mp\gametypes\_hud_util;
|
#include maps\mp\gametypes\_hud_util;
|
||||||
#include common_scripts\utility;
|
#include common_scripts\utility;
|
||||||
@ -34,8 +55,14 @@ init()
|
|||||||
level.chopper = undefined;
|
level.chopper = undefined;
|
||||||
|
|
||||||
setDvarIfUninitialized( "scr_helicopter_allowQueue", true );
|
setDvarIfUninitialized( "scr_helicopter_allowQueue", true );
|
||||||
|
setDvarIfUninitialized( "scr_helicopter_cobra_duration", 40 );
|
||||||
|
setDvarIfUninitialized( "scr_helicopter_pavelow_duration", 60 );
|
||||||
|
setDvarIfUninitialized( "scr_helicopter_apache_duration", 40 );
|
||||||
|
|
||||||
level.helicopter_allowQueue = getDVarInt("scr_helicopter_allowQueue");
|
level.helicopter_allowQueue = getDVarInt("scr_helicopter_allowQueue");
|
||||||
|
level.cobra_duration = getDvarFloat( "scr_helicopter_cobra_duration" );
|
||||||
|
level.pavelow_duration = getDvarFloat( "scr_helicopter_pavelow_duration" );
|
||||||
|
level.apache_duration = getDvarFloat( "scr_helicopter_apache_duration" );
|
||||||
|
|
||||||
// array of paths, each element is an array of start nodes that all leads to a single destination node
|
// array of paths, each element is an array of start nodes that all leads to a single destination node
|
||||||
level.heli_start_nodes = getEntArray( "heli_start", "targetname" );
|
level.heli_start_nodes = getEntArray( "heli_start", "targetname" );
|
||||||
@ -775,7 +802,7 @@ heli_think( lifeId, owner, startnode, heli_team, heliType )
|
|||||||
case "minigun":
|
case "minigun":
|
||||||
chopper thread heli_targeting();
|
chopper thread heli_targeting();
|
||||||
chopper heli_fly_simple_path( startNode );
|
chopper heli_fly_simple_path( startNode );
|
||||||
chopper thread heli_leave_on_timeout( 40.0 );
|
chopper thread heli_leave_on_timeout( level.apache_duration );
|
||||||
if ( attackAreas.size )
|
if ( attackAreas.size )
|
||||||
chopper thread heli_fly_well( attackAreas );
|
chopper thread heli_fly_well( attackAreas );
|
||||||
else
|
else
|
||||||
@ -785,14 +812,14 @@ heli_think( lifeId, owner, startnode, heli_team, heliType )
|
|||||||
chopper thread makeGunShip();
|
chopper thread makeGunShip();
|
||||||
thread teamPlayerCardSplash( "used_helicopter_flares", owner );
|
thread teamPlayerCardSplash( "used_helicopter_flares", owner );
|
||||||
chopper heli_fly_simple_path( startNode );
|
chopper heli_fly_simple_path( startNode );
|
||||||
chopper thread heli_leave_on_timeout( 60.0 );
|
chopper thread heli_leave_on_timeout( level.pavelow_duration );
|
||||||
chopper thread heli_fly_loop_path( loopNode );
|
chopper thread heli_fly_loop_path( loopNode );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
chopper thread attack_targets();
|
chopper thread attack_targets();
|
||||||
chopper thread heli_targeting();
|
chopper thread heli_targeting();
|
||||||
chopper heli_fly_simple_path( startNode );
|
chopper heli_fly_simple_path( startNode );
|
||||||
chopper thread heli_leave_on_timeout( 60.0 );
|
chopper thread heli_leave_on_timeout( level.cobra_duration );
|
||||||
chopper thread heli_fly_loop_path( loopNode );
|
chopper thread heli_fly_loop_path( loopNode );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user