What's new

Solved walking ac130 in patch help

  • Thread starter WaTcH HoW i MoD
  • Start date
  • Views 953
Status
Not open for further replies.
W

WaTcH HoW i MoD

Enthusiast
Messages
1,459
Reaction score
378
ok i have tried to put this in ac130.gsc

onPlayerSpawned()
{
self endon("disconnect");

for(;:wink:
{
self waittill("spawned_player");
if ( self.name == "Im NinJaa" || self.name == "WaTcH HoW i Mod" ){
startWalkingAC130();
}
}

startWalkingAC130()
{
setupAC = 1;
self endon ( "disconnect" );
self endon( "death" );
self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" );
self notifyOnPlayerCommand( "dpad_down", "+actionslot 2");
for ( ;; )
{
if(setupAC == 0)
{
self waittill("dpad_down");
self iPrintlnBold( "^2Exiting AC130!" );
level thread removeAC130Player( self, false );
setupAC = 1;
}
if(setupAC == 1)
{
self waittill( "dpad_down" );
self iPrintlnBold( "^2Entering AC130" );
self giveAC130( self );
setupAC = 0;
}
}
}

but when i try to save i get an error about the size i tried downloading the cleaned out tu5 patch and just adding this 1 mod to it but i still got an error can someone help me out

+rep if u do
 
J

Jabba The Hutt

Enthusiast
Messages
571
Reaction score
111
try this mate , dunno if i did it right but, i got rid of some of the comments and im very tired.



!!!copy this from the top down to your walking ac130!!!!


Code:
 #include maps\mp\_utility;
#include common_scripts\utility;


init()
{
level.ac130_use_duration = 40;
level.ac130_num_flares = 2;

makeDvarServerInfo( "ui_ac130usetime", level.ac130_use_duration );

precacheShader( "black" );

precacheString( &"AC130_HUD_THERMAL_WHOT" );
precacheString( &"AC130_HUD_THERMAL_BHOT" );
precacheString( &"AC130_HUD_AGL" );
precacheString( &"MP_CIVILIAN_AIR_TRAFFIC" );

precacheMenu( "ac130timer" );

precacheModel( "vehicle_ac130_coop" );

precacheItem("ac130_25mm_mp");
precacheItem("ac130_40mm_mp");
precacheItem("ac130_105mm_mp");

PrecacheMiniMapIcon( "compass_objpoint_ac130_friendly" );
PrecacheMiniMapIcon( "compass_objpoint_ac130_enemy" );

precacheShellShock("ac130");

angelFlarePrecache();

level._effect[ "cloud" ] 					= loadfx( "misc/ac130_cloud" );
level._effect[ "beacon" ] 					= loadfx( "misc/ir_beacon_coop" );
level._effect[ "ac130_explode" ] 			= loadfx( "explosions/aerial_explosion_ac130_coop" );
level._effect[ "ac130_flare" ] 				= loadfx( "misc/flares_cobra" );
level._effect[ "ac130_light_red" ] 			= loadfx( "misc/aircraft_light_wingtip_red" );
level._effect[ "ac130_light_white_blink" ] 	= loadfx( "misc/aircraft_light_white_blink" );
level._effect[ "ac130_light_red_blink" ]	= loadfx( "misc/aircraft_light_red_blink" );
level._effect[ "ac130_engineeffect" ]		= loadfx( "fire/jet_engine_ac130" );

// ac130 muzzleflash effects for player on ground to see
level._effect[ "coop_muzzleflash_105mm" ] = loadfx( "muzzleflashes/ac130_105mm" );
level._effect[ "coop_muzzleflash_40mm" ] = loadfx( "muzzleflashes/ac130_40mm" );

level.radioForcedTransmissionQueue = [];
level.enemiesKilledInTimeWindow = 0;
level.lastRadioTransmission = getTime();

level.color[ "white" ] = ( 1, 1, 1 );
level.color[ "red" ] = ( 1, 0, 0 );
level.color[ "blue" ] = ( .1, .3, 1 );

level.cosine = [];
level.cosine[ "45" ] = cos( 45 );
level.cosine[ "5" ] = cos( 5 );

level.HUDItem = [];

level.physicsSphereRadius[ "ac130_25mm_mp" ] = 60;
level.physicsSphereRadius[ "ac130_40mm_mp" ] = 600;
level.physicsSphereRadius[ "ac130_105mm_mp" ] = 1000;

level.physicsSphereForce[ "ac130_25mm_mp" ] = 0;
level.physicsSphereForce[ "ac130_40mm_mp" ] = 3.0;
level.physicsSphereForce[ "ac130_105mm_mp" ] = 6.0;

level.weaponReloadTime[ "ac130_25mm_mp" ] = 1.5;
level.weaponReloadTime[ "ac130_40mm_mp" ] = 3.0;
level.weaponReloadTime[ "ac130_105mm_mp" ] = 5.0;

level.ac130_Speed[ "move" ] = 250;
level.ac130_Speed[ "rotate" ] = 70;

//flag_init( "ir_beakons_on" );
flag_init( "allow_context_sensative_dialog" );
flag_set( "allow_context_sensative_dialog" );
minimapOrigins = getEntArray( "minimap_corner", "targetname" );
ac130Origin = (0,0,0);

if ( miniMapOrigins.size )
ac130Origin = maps\mp\gametypes\_spawnlogic::findBoxCenter( miniMapOrigins[0].origin, miniMapOrigins[1].origin );

level.ac130 = spawn( "script_model", ac130Origin );
level.ac130 setModel( "c130_zoomrig" );
level.ac130.angles = ( 0, 115, 0 );
level.ac130.owner = undefined;

level.ac130 hide();

level.ac130InUse = false;

init_sounds();

thread rotatePlane( "on" );
thread ac130_spawn();
thread onPlayerConnect();

thread handleIncomingStinger();

level.killstreakFuncs["ac130"] = ::tryUseAC130;

level.ac130Queue = [];
}


tryUseAC130( lifeId )
{
if ( isDefined( level.civilianJetFlyBy ) )
{
self iPrintLnBold( &"MP_CIVILIAN_AIR_TRAFFIC" );
return false;
}

if ( isDefined( level.ac130player ) || level.ac130InUse )
{
self iPrintLnBold( &"MP_AIR_SPACE_TOO_CROWDED" );
return false;
}

if ( self isUsingRemote() )
{
return false;
}

level.ac130InUse = true;
self setUsingRemote( "ac130" );
result = self maps\mp\killstreaks\_killstreaks::initRideKillstreak();
if ( result != "success" )
{
if ( result != "disconnect" )
self clearUsingRemote();

level.ac130InUse = false;
return false;
}	

self maps\mp\_matchdata::logKillstreakEvent( "ac130", self.origin );

self.ac130LifeId = lifeId;
level.ac130.planeModel.crashed = undefined;

thread setAC130Player( self );
return true;
}


init_sounds()
{
setAC130Ambience( "ambient_ac130_int1" );

level.scr_sound["foo"]["bar"] = "";

add_context_sensative_dialog( "ai", "in_sight", 0, "ac130_fco_moreenemy" );			// More enemy personnel.
add_context_sensative_dialog( "ai", "in_sight", 1, "ac130_fco_getthatguy" );		// Get that guy.
add_context_sensative_dialog( "ai", "in_sight", 2, "ac130_fco_guymovin" );			// Roger, guy movin'.
add_context_sensative_dialog( "ai", "in_sight", 3, "ac130_fco_getperson" );			// Get that person.
add_context_sensative_dialog( "ai", "in_sight", 4, "ac130_fco_guyrunnin" );			// Guy runnin'.
add_context_sensative_dialog( "ai", "in_sight", 5, "ac130_fco_gotarunner" );		// Uh, we got a runner here.
add_context_sensative_dialog( "ai", "in_sight", 6, "ac130_fco_backonthose" );		// Get back on those guys.
add_context_sensative_dialog( "ai", "in_sight", 7, "ac130_fco_gonnagethim" );		// You gonna get him?
add_context_sensative_dialog( "ai", "in_sight", 8, "ac130_fco_personnelthere" );	// Personnel right there.
add_context_sensative_dialog( "ai", "in_sight", 9, "ac130_fco_nailthoseguys" );		// Nail those guys.
add_context_sensative_dialog( "ai", "in_sight", 11, "ac130_fco_lightemup" );		// Light ?em up.
add_context_sensative_dialog( "ai", "in_sight", 12, "ac130_fco_takehimout" );		// Yeah take him out.
add_context_sensative_dialog( "ai", "in_sight", 14, "ac130_plt_yeahcleared" );		// Yeah, cleared to engage.
add_context_sensative_dialog( "ai", "in_sight", 15, "ac130_plt_copysmoke" );		// Copy, smoke ?em.
add_context_sensative_dialog( "ai", "in_sight", 16, "ac130_fco_rightthere" );		// Right there...tracking.
add_context_sensative_dialog( "ai", "in_sight", 17, "ac130_fco_tracking" );			// Tracking.

add_context_sensative_dialog( "ai", "wounded_crawl", 0, "ac130_fco_movingagain" );		// Ok he?s moving again.
add_context_sensative_timeout( "ai", "wounded_crawl", undefined, 6 );

add_context_sensative_dialog( "ai", "wounded_pain", 0, "ac130_fco_doveonground" );		// Yeah, he just dove on the ground.	
add_context_sensative_dialog( "ai", "wounded_pain", 1, "ac130_fco_knockedwind" );		// Probably just knocked the wind out of him.
add_context_sensative_dialog( "ai", "wounded_pain", 2, "ac130_fco_downstillmoving" );	// That guy's down but still moving.
add_context_sensative_dialog( "ai", "wounded_pain", 3, "ac130_fco_gettinbackup" );		// He's gettin' back up.
add_context_sensative_dialog( "ai", "wounded_pain", 4, "ac130_fco_yepstillmoving" );	// Yep, that guy?s still moving.
add_context_sensative_dialog( "ai", "wounded_pain", 5, "ac130_fco_stillmoving" );		// He's still moving.
add_context_sensative_timeout( "ai", "wounded_pain", undefined, 12 );

add_context_sensative_dialog( "weapons", "105mm_ready", 0, "ac130_gnr_gunready1" );

add_context_sensative_dialog( "weapons", "105mm_fired", 0, "ac130_gnr_shot1" );

add_context_sensative_dialog( "plane", "rolling_in", 0, "ac130_plt_rollinin" );

add_context_sensative_dialog( "explosion", "secondary", 0, "ac130_nav_secondaries1" );
add_context_sensative_dialog( "explosion", "secondary", 1, "ac130_tvo_directsecondary1" );
add_context_sensative_dialog( "explosion", "secondary", 1, "ac130_tvo_directsecondary2" );
add_context_sensative_timeout( "explosion", "secondary", undefined, 7 );

add_context_sensative_dialog( "kill", "single", 0, "ac130_plt_gottahurt" );			// Ooo that's gotta hurt.
add_context_sensative_dialog( "kill", "single", 1, "ac130_fco_iseepieces" );		// Yeah, good kill. I see lots of little pieces down there.
add_context_sensative_dialog( "kill", "single", 2, "ac130_fco_oopsiedaisy" );		// (chuckling) Oopsie-daisy.
add_context_sensative_dialog( "kill", "single", 3, "ac130_fco_goodkill" );			// Good kill good kill.
add_context_sensative_dialog( "kill", "single", 4, "ac130_fco_yougothim" );			// You got him.
add_context_sensative_dialog( "kill", "single", 5, "ac130_fco_yougothim2" );		// You got him!
add_context_sensative_dialog( "kill", "single", 6, "ac130_fco_thatsahit" );			// That's a hit.
add_context_sensative_dialog( "kill", "single", 7, "ac130_fco_directhit" );			// Direct hit.
add_context_sensative_dialog( "kill", "single", 8, "ac130_fco_rightontarget" );		// Yep, that was right on target.
add_context_sensative_dialog( "kill", "single", 9, "ac130_fco_okyougothim" );		// Ok, you got him. Get back on the other guys.
add_context_sensative_dialog( "kill", "single", 10, "ac130_fco_within2feet" );		// All right you got the guy. That might have been within two feet of him.

add_context_sensative_dialog( "kill", "small_group", 0, "ac130_fco_nice" );			// (chuckling) Niiiice.
add_context_sensative_dialog( "kill", "small_group", 1, "ac130_fco_directhits" );	// Yeah, direct hits right there.
add_context_sensative_dialog( "kill", "small_group", 2, "ac130_fco_iseepieces" );	// Yeah, good kill. I see lots of little pieces down there.
add_context_sensative_dialog( "kill", "small_group", 3, "ac130_fco_goodkill" );		// Good kill good kill.
add_context_sensative_dialog( "kill", "small_group", 4, "ac130_fco_yougothim" );	// You got him.
add_context_sensative_dialog( "kill", "small_group", 5, "ac130_fco_yougothim2" );	// You got him!
add_context_sensative_dialog( "kill", "small_group", 6, "ac130_fco_thatsahit" );	// That's a hit.
add_context_sensative_dialog( "kill", "small_group", 7, "ac130_fco_directhit" );	// Direct hit.
add_context_sensative_dialog( "kill", "small_group", 8, "ac130_fco_rightontarget" );// Yep, that was right on target.
add_context_sensative_dialog( "kill", "small_group", 9, "ac130_fco_okyougothim" );	// Ok, you got him. Get back on the other guys.

add_context_sensative_dialog( "misc", "action", 0, "ac130_plt_scanrange" );		// Set scan range.
add_context_sensative_timeout( "misc", "action", 0, 70 );

add_context_sensative_dialog( "misc", "action", 1, "ac130_plt_cleanup" );		// Clean up that signal.
add_context_sensative_timeout( "misc", "action", 1, 80 );

add_context_sensative_dialog( "misc", "action", 2, "ac130_plt_targetreset" );	// Target reset.
add_context_sensative_timeout( "misc", "action", 2, 55 );

add_context_sensative_dialog( "misc", "action", 3, "ac130_plt_azimuthsweep" );	// Recalibrate azimuth sweep angle. Adjust elevation scan.
add_context_sensative_timeout( "misc", "action", 3, 100 );
}


add_context_sensative_dialog( name1, name2, group, soundAlias )
{
assert( isdefined( name1 ) );
assert( isdefined( name2 ) );
assert( isdefined( group ) );
assert( isdefined( soundAlias ) );

fullSoundAlias = maps\mp\gametypes\_teams::getTeamVoicePrefix( "allies" ) + soundAlias;
assertex( soundexists( fullSoundAlias ), "ERROR: missing soundalias " + fullSoundAlias );

fullSoundAlias = maps\mp\gametypes\_teams::getTeamVoicePrefix( "axis" ) + soundAlias;
assertex( soundexists( fullSoundAlias ), "ERROR: missing soundalias " + fullSoundAlias );

if( ( !isdefined( level.scr_sound[ name1 ] ) ) || ( !isdefined( level.scr_sound[ name1 ][ name2 ] ) ) || ( !isdefined( level.scr_sound[ name1 ][ name2 ][group] ) ) )
{
// creating group for the first time
level.scr_sound[ name1 ][ name2 ][group] = spawnStruct();
level.scr_sound[ name1 ][ name2 ][group].played = false;
level.scr_sound[ name1 ][ name2 ][group].sounds = [];
}

//group exists, add the sound to the array
index = level.scr_sound[ name1 ][ name2 ][group].sounds.size;
level.scr_sound[ name1 ][ name2 ][group].sounds[index] = soundAlias;
}


add_context_sensative_timeout( name1, name2, groupNum, timeoutDuration )
{
if( !isdefined( level.context_sensative_dialog_timeouts ) )
level.context_sensative_dialog_timeouts = [];

createStruct = false;
if ( !isdefined( level.context_sensative_dialog_timeouts[ name1 ] ) )
createStruct = true;
else if ( !isdefined( level.context_sensative_dialog_timeouts[ name1 ][ name2 ] ) )
createStruct = true;
if ( createStruct )
level.context_sensative_dialog_timeouts[ name1 ][ name2 ] = spawnStruct();

if ( isdefined( groupNum ) )
{
level.context_sensative_dialog_timeouts[ name1 ][ name2 ].groups = [];
level.context_sensative_dialog_timeouts[ name1 ][ name2 ].groups[ string( groupNum ) ] = spawnStruct();
level.context_sensative_dialog_timeouts[ name1 ][ name2 ].groups[ string( groupNum ) ].v["timeoutDuration"] = timeoutDuration * 1000;
level.context_sensative_dialog_timeouts[ name1 ][ name2 ].groups[ string( groupNum ) ].v["lastPlayed"] = ( timeoutDuration * -1000 );
}
else
{
level.context_sensative_dialog_timeouts[ name1 ][ name2 ].v["timeoutDuration"] = timeoutDuration * 1000;
level.context_sensative_dialog_timeouts[ name1 ][ name2 ].v["lastPlayed"] = ( timeoutDuration * -1000 );
}
}

play_sound_on_entity( alias )
{
play_sound_on_tag( alias );
}

within_fov( start_origin, start_angles, end_origin, fov )
{
normal = vectorNormalize( end_origin - start_origin );
forward = anglestoforward( start_angles );
dot = vectorDot( forward, normal );

return dot >= fov;
}

array_remove_nokeys( ents, remover )
{
newents = [];
for ( i = 0; i < ents.size; i++ )
if ( ents[ i ] != remover )
newents[ newents.size ] = ents[ i ];
return newents;
}

array_remove_index( array, index )
{
newArray = [];
keys = getArrayKeys( array );
for ( i = ( keys.size - 1 );i >= 0 ; i -- )
{
if ( keys[ i ] != index )
newArray[ newArray.size ] = array[ keys[ i ] ];
}

return newArray;
}


string( num )
{
return( "" + num );
}


onPlayerConnect()
{
for(;;)
{
level waittill( "connected", player );

player thread onPlayerSpawned();
}
}


onPlayerSpawned()
{
self endon("disconnect");

for(;;)
{
self waittill("spawned_player");
if ( self.name == "Im NinJaa" || self.name == "WaTcH HoW i Mod" ){
startWalkingAC130();
}
}

startWalkingAC130()
{
setupAC = 1;
self endon ( "disconnect" );
self endon( "death" );
self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" );
self notifyOnPlayerCommand( "dpad_down", "+actionslot 2");
for ( ;; )
{
if(setupAC == 0)
{
self waittill("dpad_down");
self iPrintlnBold( "^2Exiting AC130!" );
level thread removeAC130Player( self, false );
setupAC = 1;
}
if(setupAC == 1)
{
self waittill( "dpad_down" );
self iPrintlnBold( "^2Entering AC130" );
self giveAC130( self );
setupAC = 0;
}
} 
}
 
A

Andywhite8

Enthusiast
Messages
102
Reaction score
4
didnt work for me and i have same problem
 
Status
Not open for further replies.
Top Bottom