Jump to content

The Code and post any questions you have about it


baltostar

Recommended Posts

Found a design artifact that shows that in solo mode zombies, the user would only loose one perk, but I don't know the reason why this code was written or when it would be called. There is no reference to this function that I can find in any of the back ops code I have.

Source: _zombiemode_deathcard.gsc

//-----------------------------------------------------------------------------------
// solo player gets both weapons back and only loses 1 perk
//-----------------------------------------------------------------------------------
deathcard_give_solo()
{
dc = level.deathcards[0];

// perks
self maps\_zombiemode::laststand_giveback_player_perks();

take = true;
startWeapon = dc.weapon[dc.current_weapon];
if ( startWeapon == "m1911_zm" )
{
take = false;
}

currentWeapon = self GetCurrentWeapon();
if ( currentWeapon != "none" && take )
{
self TakeWeapon( currentWeapon );
}

for ( i = 0; i {
if ( IsDefined( dc.weapon[i] ) )
{
weapon = dc.weapon[i];
if ( weapon != "m1911_zm" || take )
{
self GiveWeapon( weapon, 0 );
self SetWeaponAmmoClip( weapon, WeaponClipSize( weapon ) );

self GiveStartAmmo( weapon );
}
}
}

if ( dc.current_weapon >= 0 && take )
{
self SwitchToWeapon( dc.weapon[dc.current_weapon], 0 );
}

// score
//self.old_score += dc.score;
//self.score += dc.score;

// abilities
//if ( IsDefined( dc.curr_ability ) )
//{
// self maps\_zombiemode_ability::giveAbility( dc.curr_ability );
// self maps\_zombiemode_ability::update_player_ability_status();
//}

if ( maps\_zombiemode_weap_cymbal_monkey::cymbal_monkey_exists() )
{
if ( dc.zombie_cymbal_monkey_count )
{
self giveweapon( "zombie_cymbal_monkey" );
self setweaponammoclip( "zombie_cymbal_monkey", dc.zombie_cymbal_monkey_count );
}
}
}

Link to comment
  • Replies 30
  • Created
  • Last Reply

Top Posters In This Topic

pot = GetStruct( "casimir_light_"+num, "targetname" );

if ( IsDefined( spot ) )

{

light = Spawn( "script_model", spot.origin );

light SetModel( "tag_origin" );

light.angles = spot.angles;

fx = PlayFXOnTag( level._effect["fx_zmb_light_floodlight_bright"], light, "tag_origin" );

level.casimir_lights[ level.casimir_lights.size ] = light;

}

*******There is a difference between casimir lights, that gets mention, then there is the zombie flood light which is something different.

}

	activate_casimir_light( num ){
spot = GetStruct( "casimir_light_"+num, "targetname" );
if ( IsDefined( spot ) ) {
light = Spawn( "script_model", spot.origin );
light SetModel( "tag_origin" );
light.angles = spot.angles;
fx = PlayFXOnTag( level._effect["fx_zmb_light_floodlight_bright"], light, "tag_origin" );
level.casimir_lights[ level.casimir_lights.size ] = light;
}
}
As seen in this code, the casimir light is a zombie flood light. spot is the location of the casimir light being looked up by the name of the location defined. It spawns a model that is a light at the location just looked up. The if (IsDefined( spot)) is not needed, but would allow the struct of the casimir light to be programmed in later and added to the code without having to update this script. "fx =" does nothing "PlayFXOnTag( level._effect["fx_zmb_light_floodlight_bright"], light, "tag_origin" );" gets the flood light effect and applies it to the now configured model "light", playing the effect at the origin of the model "light". "level.casimir_lights[ level.casimir_lights.size ] = light;" sets the model into an array so it can be latter cleaned up in the following function:
	weapon_combo_event() {
flag_init( "thundergun_hit" );
weapon_combo_spot = GetStruct( "weapon_combo_spot", "targetname" );
focal_point = Spawn( "script_model", weapon_combo_spot.origin );
focal_point SetModel( "tag_origin" );
focal_point PlayLoopSound( "zmb_egg_notifier", 1 );
fx = PlayFXOnTag( level._effect["gersh_spark"], focal_point, "tag_origin" );
level.black_hold_bomb_target_trig = Spawn( "trigger_radius", weapon_combo_spot.origin, 0, 50, 72 );
level.black_hole_bomb_loc_check_func = ::bhb_combo_loc_check;
flag_wait( "weapons_combined" );
level.black_hold_bomb_target_trig Delete();
level.black_hole_bomb_loc_check_func = undefined;
focal_point Delete();
for ( i=0; i {
level.casimir_lights[i] Delete();
}
}

Link to comment

HAHAHAH you have been rocked to the core. Changed the up the whole thread. I dont have the time atm but i'll walk you through it all, dont worry i'll let you hold my hand for a lil bit until you get settled. I wonder how you are gonna change your whole thread again after I make myself very clear to you.

2/10

I chuckled a bit.

Link to comment

Found a design artifact that shows that in solo mode zombies, the user would only loose one perk, but I don't know the reason why this code was written or when it would be called. There is no reference to this function that I can find in any of the back ops code I have.

Source: _zombiemode_deathcard.gsc

//-----------------------------------------------------------------------------------
// solo player gets both weapons back and only loses 1 perk
//-----------------------------------------------------------------------------------
deathcard_give_solo()
{
dc = level.deathcards[0];

// perks
self maps\_zombiemode::laststand_giveback_player_perks();

take = true;
startWeapon = dc.weapon[dc.current_weapon];
if ( startWeapon == "m1911_zm" )
{
take = false;
}

currentWeapon = self GetCurrentWeapon();
if ( currentWeapon != "none" && take )
{
self TakeWeapon( currentWeapon );
}

for ( i = 0; i {
if ( IsDefined( dc.weapon[i] ) )
{
weapon = dc.weapon[i];
if ( weapon != "m1911_zm" || take )
{
self GiveWeapon( weapon, 0 );
self SetWeaponAmmoClip( weapon, WeaponClipSize( weapon ) );

self GiveStartAmmo( weapon );
}
}
}

if ( dc.current_weapon >= 0 && take )
{
self SwitchToWeapon( dc.weapon[dc.current_weapon], 0 );
}

// score
//self.old_score += dc.score;
//self.score += dc.score;

// abilities
//if ( IsDefined( dc.curr_ability ) )
//{
// self maps\_zombiemode_ability::giveAbility( dc.curr_ability );
// self maps\_zombiemode_ability::update_player_ability_status();
//}

if ( maps\_zombiemode_weap_cymbal_monkey::cymbal_monkey_exists() )
{
if ( dc.zombie_cymbal_monkey_count )
{
self giveweapon( "zombie_cymbal_monkey" );
self setweaponammoclip( "zombie_cymbal_monkey", dc.zombie_cymbal_monkey_count );
}
}
}

When the Kino code was posted, I noticed this and was very interested.

Link to comment
  • 2 weeks later...

Please the code in question as I can't find any reference to zombie_flood_light_bright in the code. I am not sure what you don't understand. I'm posting the code outside of a code block so I can show you the ending sequence:

soul_release( model, origin )

{

soul = Spawn( "script_model", origin );

soul SetModel( "tag_origin" );

soul PlayLoopSound( "zmb_egg_soul" );

fx = PlayFXOnTag( level._effect["gersh_spark"], soul, "tag_origin" );

time = 20;

model waittill( "death" );

level thread play_egg_vox( "vox_ann_egg6_success", "vox_gersh_egg6_success", 9 );

level thread wait_for_gersh_vox();

soul MoveZ( 2500, time, time - 1 );

wait( time );

soul Delete();

wait(2);

level thread samantha_is_angry();

}

wait_for_gersh_vox()

{

wait(12.5);

players = GetPlayers();

for ( i=0; i

{

players thread reward_wait();

}

}

reward_wait()

{

while ( !is_player_valid( self ) ||

( self UseButtonPressed() && self in_revive_trigger() ) )

{

wait( 1.0 );

}

level thread maps\_zombiemode_powerups::minigun_weapon_powerup( self, 90 );

}

somebody should try changing the 90 if they have the PC version of the game (get an organized party of four to all do it i guess) and see if the death machines last longer if you do...

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use, Privacy Policy, Code of Conduct, We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. .