[Mod FF]: Changed scripts size
This commit is contained in:
parent
354e342a11
commit
3c2352f6b2
44
iw3sp_mod_ff_src/raw/scripts/village_assault/hint.gsc
Normal file
44
iw3sp_mod_ff_src/raw/scripts/village_assault/hint.gsc
Normal file
@ -0,0 +1,44 @@
|
||||
#include common_scripts\utility;
|
||||
#include maps\_utility;
|
||||
|
||||
main()
|
||||
{
|
||||
ReplaceFunc(maps\village_assault_code::air_support_hint_print_activate, ::air_support_hint_print_activate);
|
||||
}
|
||||
|
||||
air_support_hint_print_activate()
|
||||
{
|
||||
level endon( "alasad_sequence_started" );
|
||||
|
||||
while( !maps\village_assault_code::player_activated_air_support() )
|
||||
{
|
||||
if ( level.air_support_hint_print_dialog_next == 0 )
|
||||
{
|
||||
// Soap! Call in air support on that building!
|
||||
level.price thread maps\_anim::anim_single_solo( level.price, "airsupport" );
|
||||
}
|
||||
else if ( level.air_support_hint_print_dialog_next == 1 )
|
||||
{
|
||||
// Use our air support to soften up that building!
|
||||
level.price thread maps\_anim::anim_single_solo( level.price, "softenup" );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Mosin Two-Five here. We are ready to attack and are standing by for new orders.
|
||||
thread radio_dialogue_queue( "readytoattack" );
|
||||
}
|
||||
level.air_support_hint_print_dialog_next++;
|
||||
|
||||
if ( !flag( "gave_air_support_hint" ) )
|
||||
{
|
||||
flag_set( "gave_air_support_hint" );
|
||||
if ( isdefined( level.console ) && level.console || getdvarint("gpad_in_use") )
|
||||
thread maps\village_assault_code::display_air_support_hint_console();
|
||||
else
|
||||
thread maps\village_assault_code::display_air_support_hint_pc();
|
||||
}
|
||||
wait 5;
|
||||
level.air_support_hint_delete = true;
|
||||
wait 60;
|
||||
}
|
||||
}
|
124
iw3sp_mod_ff_src/raw/scripts/village_defend/hint.gsc
Normal file
124
iw3sp_mod_ff_src/raw/scripts/village_defend/hint.gsc
Normal file
@ -0,0 +1,124 @@
|
||||
#include common_scripts\utility;
|
||||
#include maps\_utility;
|
||||
|
||||
main()
|
||||
{
|
||||
ReplaceFunc(maps\village_defend::minigun_fallback, ::minigun_fallback);
|
||||
ReplaceFunc(maps\village_defend::airstrike_command, ::airstrike_command);
|
||||
}
|
||||
|
||||
minigun_fallback()
|
||||
{
|
||||
flag_wait( "ridgeline_targeted" );
|
||||
|
||||
autosave_by_name( "ridgeline_under_mortar_fire" );
|
||||
|
||||
redshirt1 = getent( "redshirt1", "targetname" );
|
||||
redshirt2 = getent( "redshirt2", "targetname" );
|
||||
|
||||
redshirt_node1 = getnode( "fallback_redshirt1", "targetname" );
|
||||
redshirt_node2 = getnode( "fallback_redshirt2", "targetname" );
|
||||
|
||||
//Left trigger spin functionality for console controllers
|
||||
if( level.console || getdvarint("gpad_in_use") )
|
||||
{
|
||||
level thread maps\village_defend::minigun_firstuse_check();
|
||||
//level thread minigun_session_check();
|
||||
|
||||
add_hint_string( "minigun_spin_left_trigger", &"SCRIPT_PLATFORM_SPOOL_MINIGUN", maps\village_defend::should_break_minigun_spin_hint );
|
||||
}
|
||||
|
||||
//"They're targeting our position with mortars. It's time to fall back."
|
||||
//iprintln( "They're targeting our position with mortars. It's time to fall back." );
|
||||
radio_dialogue_queue( "targetingour" );
|
||||
|
||||
thread maps\village_defend::minigun_orders();
|
||||
|
||||
wait 2;
|
||||
|
||||
//"Two, falling back."
|
||||
radio_dialogue_queue( "twofallingback" );
|
||||
|
||||
redshirt1 allowedstances ( "stand", "crouch", "prone" );
|
||||
redshirt1 setgoalnode( redshirt_node1 );
|
||||
wait randomfloatrange( 0.7, 1.2 );
|
||||
|
||||
//"Three, on the move."
|
||||
radio_dialogue_queue( "threeonthemove" );
|
||||
|
||||
redshirt2 allowedstances ( "stand", "crouch", "prone" );
|
||||
redshirt2 setgoalnode( redshirt_node2 );
|
||||
|
||||
priceNode = getnode( "fallback_price", "targetname" );
|
||||
level.price allowedstances ( "stand", "crouch", "prone" );
|
||||
level.price setgoalnode( priceNode );
|
||||
|
||||
//"Three here. Two's in the far eastern building. We've got the eastern road locked down."
|
||||
radio_dialogue_queue( "easternroadlocked" );
|
||||
|
||||
level.price.baseaccuracy = 1;
|
||||
level.price.ignoreSuppression = true;
|
||||
|
||||
redshirt1.baseaccuracy = 1;
|
||||
redshirt1.ignoreSuppression = true;
|
||||
|
||||
redshirt2.baseaccuracy = 1;
|
||||
redshirt2.ignoreSuppression = true;
|
||||
|
||||
thread maps\village_defend_code::friendly_pushplayer( "off" );
|
||||
|
||||
wait 5;
|
||||
|
||||
thread maps\village_defend::intro_church_tower_explode();
|
||||
}
|
||||
|
||||
airstrike_command()
|
||||
{
|
||||
flag_wait( "airstrikes_ready" );
|
||||
|
||||
thread maps\village_defend::callStrike( level.player.origin, 1, ( 0, 110, 0 ) );
|
||||
wait 1.2;
|
||||
thread maps\village_defend::callStrike( level.player.origin, 1, ( 0, 96, 0 ) );
|
||||
wait 1;
|
||||
thread maps\village_defend::callStrike( level.player.origin, 1, ( 0, 126, 0 ) );
|
||||
|
||||
wait 5;
|
||||
|
||||
//"Bravo Six, this is Falcon One standing by to provide close air support. Gimme a target over."
|
||||
radio_dialogue_queue( "casready" );
|
||||
|
||||
if ( isdefined( level.console ) && level.console || getdvarint("gpad_in_use"))
|
||||
thread maps\village_defend::airstrike_hint_console();
|
||||
else
|
||||
thread maps\village_defend::airstrike_hint_pc();
|
||||
|
||||
level.player giveWeapon( "airstrike_support" );
|
||||
level.player SetActionSlot( 2, "weapon" , "airstrike_support" );
|
||||
|
||||
thread maps\village_defend::airstrike_support();
|
||||
|
||||
wait 3;
|
||||
|
||||
flag_set( "falcon_one_finished_talking" );
|
||||
|
||||
flag_wait( "return_trip_begins" );
|
||||
|
||||
thread maps\village_defend::airstrike_frequency_check();
|
||||
|
||||
level endon ( "stop_airstrike_reminders" );
|
||||
level endon ( "no_airstrike_ammo" );
|
||||
|
||||
while( 1 )
|
||||
{
|
||||
startTime = gettime();
|
||||
wait 70;
|
||||
|
||||
if( !level.airstrikeCalledRecently )
|
||||
{
|
||||
//"Bravo Six, this is Falcon One standing by to provide close air support. Gimme a target over."
|
||||
radio_dialogue_queue( "casready" );
|
||||
|
||||
level.airstrikeCalledRecently = false;
|
||||
}
|
||||
}
|
||||
}
|
249
iw3sp_mod_ff_src/raw/scripts/village_defend/minigun.gsc
Normal file
249
iw3sp_mod_ff_src/raw/scripts/village_defend/minigun.gsc
Normal file
@ -0,0 +1,249 @@
|
||||
#include common_scripts\utility;
|
||||
#include maps\_utility;
|
||||
|
||||
main()
|
||||
{
|
||||
ReplaceFunc(maps\village_defend_code::minigun_used, ::minigun_used);
|
||||
}
|
||||
|
||||
minigun_used()
|
||||
{
|
||||
flag_wait( "player_on_minigun" );
|
||||
|
||||
//Tweakable values
|
||||
|
||||
if( level.console || getdvarint("gpad_in_use") )
|
||||
overheat_time = 6; //full usage to overheat (original 8)
|
||||
else
|
||||
overheat_time = 10;
|
||||
|
||||
cooldown_time = 4; //time to cool down from max heat back to 0 if not operated during this time (original 4)
|
||||
penalty_time = 7; //hold inoperative for this amount of time
|
||||
rate = 0.02;
|
||||
slow_rate = 0.02;
|
||||
overheat_fx_rate = 0.35;
|
||||
|
||||
adsbuttonAccumulate = 0; //check for left trigger hold down duration
|
||||
|
||||
//Not to tweak
|
||||
|
||||
heatrate = 1 / ( overheat_time * 20 ); //increment of the temp gauge for heating up
|
||||
coolrate = 1 / ( cooldown_time * 20 ); //increment of the temp gauge for cooling down
|
||||
level.inuse = false;
|
||||
momentum = 0;
|
||||
self.momentum = 0;
|
||||
heat = 0;
|
||||
max = 1;
|
||||
maxed = false;
|
||||
firing = false;
|
||||
maxed_time = undefined;
|
||||
overheated = false;
|
||||
penalized_time = 0; //if greater than gettime
|
||||
startFiringTime = undefined;
|
||||
oldheat = 0;
|
||||
level.frames = 0;
|
||||
level.normframes = 0;
|
||||
next_overheat_fx = 0;
|
||||
thread maps\village_defend_code::minigun_rumble();
|
||||
for ( ;; )
|
||||
{
|
||||
level.normframes++;
|
||||
if ( flag( "player_on_minigun" ) )
|
||||
{
|
||||
if ( !level.inuse )
|
||||
{
|
||||
if ( level.Console || getdvarint("gpad_in_use") )
|
||||
{
|
||||
//if ( level.player adsbuttonpressed() || ( level.player attackbuttonpressed() && !overheated ) )
|
||||
if ( level.player adsbuttonpressed() )
|
||||
{
|
||||
level.inuse = true;
|
||||
self thread maps\village_defend_code::minigun_sound_spinup();
|
||||
}
|
||||
}
|
||||
else
|
||||
if( level.player attackbuttonpressed() )
|
||||
{
|
||||
level.inuse = true;
|
||||
self thread maps\village_defend_code::minigun_sound_spinup();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( level.Console || getdvarint("gpad_in_use") )
|
||||
{
|
||||
//if ( !level.player adsbuttonpressed() && !level.player attackbuttonpressed() )
|
||||
if ( !level.player adsbuttonpressed() )
|
||||
{
|
||||
level.inuse = false;
|
||||
self thread maps\village_defend_code::minigun_sound_spindown();
|
||||
}
|
||||
else
|
||||
if( !level.player adsbuttonpressed() && level.player attackbuttonpressed() && overheated )
|
||||
{
|
||||
level.inuse = false;
|
||||
self thread maps\village_defend_code::minigun_sound_spindown();
|
||||
}
|
||||
}
|
||||
else
|
||||
if( !level.player attackbuttonpressed() )
|
||||
{
|
||||
level.inuse = false;
|
||||
self thread maps\village_defend_code::minigun_sound_spindown();
|
||||
}
|
||||
else
|
||||
if( level.player attackbuttonpressed() && overheated )
|
||||
{
|
||||
level.inuse = false;
|
||||
self thread maps\village_defend_code::minigun_sound_spindown();
|
||||
}
|
||||
}
|
||||
|
||||
if( level.Console || getdvarint("gpad_in_use"))
|
||||
{
|
||||
if( level.player adsbuttonpressed() )
|
||||
{
|
||||
adsbuttonAccumulate += 0.05;
|
||||
|
||||
if( adsbuttonAccumulate >= 2.75 )
|
||||
{
|
||||
flag_set( "minigun_lesson_learned" );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
adsbuttonAccumulate = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if ( !firing )
|
||||
{
|
||||
if( level.player attackbuttonpressed() && !overheated && maxed )
|
||||
{
|
||||
firing = true;
|
||||
startFiringTime = gettime();
|
||||
}
|
||||
else
|
||||
if ( level.player attackbuttonpressed() && overheated )
|
||||
{
|
||||
firing = false;
|
||||
startFiringTime = undefined;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( !level.player attackbuttonpressed() )
|
||||
{
|
||||
firing = false;
|
||||
startFiringTime = undefined;
|
||||
}
|
||||
|
||||
if( level.player attackbuttonpressed() && !maxed )
|
||||
{
|
||||
firing = false;
|
||||
startFiringTime = undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( firing || level.inuse == true )
|
||||
{
|
||||
self thread maps\village_defend_code::minigun_sound_spindown();
|
||||
}
|
||||
|
||||
firing = false;
|
||||
level.inuse = false;
|
||||
}
|
||||
|
||||
if ( overheated )
|
||||
{
|
||||
if ( !(heat >= max) )
|
||||
{
|
||||
overheated = false;
|
||||
startFiringTime = undefined;
|
||||
self TurretFireEnable();
|
||||
}
|
||||
}
|
||||
|
||||
if ( level.inuse )
|
||||
{
|
||||
momentum += rate;
|
||||
self.momentum = momentum;
|
||||
}
|
||||
else
|
||||
{
|
||||
momentum -= slow_rate;
|
||||
self.momentum = momentum;
|
||||
}
|
||||
|
||||
if ( momentum > max )
|
||||
{
|
||||
momentum = max;
|
||||
self.momentum = momentum;
|
||||
}
|
||||
if ( momentum < 0 )
|
||||
{
|
||||
momentum = 0;
|
||||
self.momentum = momentum;
|
||||
self notify ( "done" );
|
||||
}
|
||||
|
||||
if ( momentum == max )
|
||||
{
|
||||
maxed = true;
|
||||
maxed_time = gettime();
|
||||
self TurretFireEnable();
|
||||
}
|
||||
else
|
||||
{
|
||||
maxed = false;
|
||||
self TurretFireDisable();
|
||||
}
|
||||
|
||||
if ( firing && !overheated )
|
||||
{
|
||||
level.frames++;
|
||||
heat += heatrate;
|
||||
}
|
||||
|
||||
if( gettime() > penalized_time && !firing )
|
||||
heat -= coolrate;
|
||||
|
||||
if ( heat > max )
|
||||
heat = max;
|
||||
if ( heat < 0 )
|
||||
heat = 0;
|
||||
|
||||
level.heat = heat;
|
||||
|
||||
level.turret_heat_status = int( heat * 114 );
|
||||
if ( isdefined( level.overheat_status2 ) )
|
||||
thread maps\village_defend_code::overheat_hud_update();
|
||||
|
||||
if( (heat >= max) && (heat <= max) && ((oldheat < max) || (oldheat > max)) )
|
||||
{
|
||||
overheated = true;
|
||||
penalized_time = gettime() + penalty_time * 1000;
|
||||
next_overheat_fx = 0;
|
||||
thread maps\village_defend_code::overheat_overheated();
|
||||
}
|
||||
oldheat = heat;
|
||||
|
||||
if ( overheated )
|
||||
{
|
||||
self TurretFireDisable();
|
||||
firing = false;
|
||||
//playfxOnTag( getfx( "turret_overheat_haze" ), self, "tag_flash");
|
||||
if ( gettime() > next_overheat_fx )
|
||||
{
|
||||
playfxOnTag( getfx( "turret_overheat_smoke" ), self, "tag_flash");
|
||||
next_overheat_fx = gettime() + overheat_fx_rate * 1000;
|
||||
}
|
||||
}
|
||||
|
||||
self setanim( getanim( "spin" ), 1, 0.2, momentum );
|
||||
|
||||
wait( 0.05 );
|
||||
}
|
||||
}
|
@ -12,6 +12,9 @@ rawfile,scripts/bog_a/three_coming_out.gsc
|
||||
rawfile,scripts/launchfacility_a/loudspeaker.gsc
|
||||
rawfile,scripts/launchfacility_b/loudspeaker.gsc
|
||||
rawfile,scripts/simplecredits/credits.gsc
|
||||
rawfile,scripts/village_assault/hint.gsc
|
||||
rawfile,scripts/village_defend/hint.gsc
|
||||
rawfile,scripts/village_defend/minigun.gsc
|
||||
rawfile,scripts/_damagefeedback.gsc
|
||||
|
||||
// Use and save 'scripts/_names.gsc' file in 1252 encoding!
|
||||
@ -27,9 +30,6 @@ rawfile,scripts/paintball.gsc
|
||||
// Need rework these scripts in future updates
|
||||
rawfile,maps/killhouse.gsc
|
||||
rawfile,maps/killhouse_code.gsc
|
||||
rawfile,maps/village_assault_code.gsc
|
||||
rawfile,maps/village_defend.gsc
|
||||
rawfile,maps/village_defend_code.gsc
|
||||
|
||||
material,trophy_0
|
||||
material,trophy_1
|
||||
|
|
Loading…
x
Reference in New Issue
Block a user