Jump to content

The Code and post any questions you have about it


baltostar

Recommended Posts

I'm a software engineer and will answer questions about different aspects of the code. From what I can gather, the source for the scripts (code) is stored unencrypted and that is why it has been found and not the encrypted game code.

Note: I have not copied the code from the game as I don't have the resources or legal ability to do so. For this reason, I can only review code that is posted on this site.

The only way I see the DM Easter Egg Continuing:

I've stated in the past that the Easter Egg is complete as all the events in the script I have access to are compete.

Yet, if your holding out hope that you can do something with the DMs, the only possible chance for that is this line of code:

level clientnotify( "sia" );

No where else in the code is the function clientnotify used. This could mean there is some other code that listens for "sia" and does something. This is speculation, but its the only possible way that i see the DM Easter egg continuing.

So far I've only seen the code for the Main Easter egg:

Note: I formatted it from the code posted on the: viewtopic.php?f=60&t=7079 thread


{
include animscripts\zombie_utility;
#include common_scripts\utility;
#include maps\_utility;
#include maps\_zombiemode_utility;
#include maps\_ambientpackage;
#include maps\_music;
#include maps\_busing;
#include maps\_zombiemode_audio;
init()
{
PreCacheModel( "p_glo_electrical_transformer" );
PreCacheModel( "p_zom_monitor_csm_screen_on" );
PreCacheModel( "p_zom_monitor_csm_screen_logo" );
PreCacheModel( "p_rus_electric_switch_stop" );
PreCacheModel( "p_rus_clock_lrg" );
flag_init( "target_teleported" );
flag_init( "rerouted_power" );
flag_init( "switches_synced" );
flag_init( "pressure_sustained" );
flag_init( "passkey_confirmed" );
flag_init( "weapons_combined" );
level.casimir_lights = [];
level.lander_letters[ "a" ] = GetEnt( "letter_a", "targetname" );
level.lander_letters[ "e" ] = GetEnt( "letter_e", "targetname" );
level.lander_letters[ "h" ] = GetEnt( "letter_h", "targetname" );
level.lander_letters[ "i" ] = GetEnt( "letter_i", "targetname" );
level.lander_letters[ "l" ] = GetEnt( "letter_l", "targetname" );
level.lander_letters[ "m" ] = GetEnt( "letter_m", "targetname" );
level.lander_letters[ "n" ] = GetEnt( "letter_n", "targetname" );
level.lander_letters[ "r" ] = GetEnt( "letter_r", "targetname" );
level.lander_letters[ "s" ] = GetEnt( "letter_s", "targetname" );
level.lander_letters[ "t" ] = GetEnt( "letter_t", "targetname" );
level.lander_letters[ "u" ] = GetEnt( "letter_u", "targetname" );
level.lander_letters[ "y" ] = GetEnt( "letter_y", "targetname" );
keys = GetArrayKeys( level.lander_letters );

for ( i=0; i level.lander_letters[ keys[i] ] Hide();
}
teleport_target_event();
reroute_power_event();
sync_switch_event();
pressure_plate_event();
lander_passkey_event();
weapon_combo_event();
level notify( "help_found" );
monitor = GetEnt( "casimir_monitor", "targetname" );
monitor SetModel( "p_zom_monitor_csm_screen_off" );
}

play_easter_egg_audio( alias, sound_ent, text ){
if( alias == undefined ) {
return;
}
sound_ent PlaySound( alias, "sounddone" );
sound_ent waittill( "sounddone" );
}

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;
}
}

teleport_target_event() {
teleport_target_start = getstruct( "teleport_target_start", "targetname" );
teleport_target_spark = getstruct( "teleport_target_spark", "targetname" );
level.teleport_target = Spawn( "script_model", teleport_target_start.origin );
level.teleport_target SetModel( "p_glo_electrical_transformer" );
level.teleport_target.angles = teleport_target_start.angles;
level.teleport_target PlayLoopSound( "zmb_egg_notifier", 1 );
teleport_target_spark = Spawn( "script_model", teleport_target_spark.origin );
teleport_target_spark SetModel( "tag_origin" );
PlayFXOnTag( level._effect["switch_sparks"], teleport_target_spark, "tag_origin" );
level.teleport_target_trigger = Spawn( "trigger_radius", teleport_target_start.origin + (0,0,-70), 0, 125, 100 );
level.black_hole_bomb_loc_check_func = ::bhb_teleport_loc_check;
flag_wait( "target_teleported" );
teleport_target_spark Delete();
level.black_hole_bomb_loc_check_func = undefined;
level thread play_egg_vox( "vox_ann_egg1_success", "vox_gersh_egg1", 1 );
}


bhb_teleport_loc_check( grenade, model, info )
{
if( IsDefined( level.teleport_target_trigger ) && grenade IsTouching( level.teleport_target_trigger ) )
{
model SetClientFlag( level._SCRIPTMOVER_CLIENT_FLAG_BLACKHOLE );
grenade thread maps\_zombiemode_weap_black_hole_bomb::do_black_hole_bomb_sound( model, info );
level thread teleport_target( grenade, model );
return true;
}
return false;
}

teleport_target( grenade, model )
{
level.teleport_target_trigger Delete();
level.teleport_target_trigger = undefined;
wait( 1.0 );
time = 3.0;
level.teleport_target MoveTo( grenade.origin + (0,0,50), time, time - 0.05 );
wait( time );
teleport_target_end = getstruct( "teleport_target_end", "targetname" );
level.teleport_target Hide();
playsoundatposition( "zmb_gersh_teleporter_out", grenade.origin + (0,0,50) );
wait( 0.5 );
level.teleport_target.angles = teleport_target_end.angles;
level.teleport_target MoveTo( teleport_target_end.origin, 0.05 );
level.teleport_target StopLoopSound( 1 );
wait( 0.5 );
level.teleport_target Show();
PlayFXOnTag( level._effect[ "black_hole_bomb_event_horizon" ], level.teleport_target, "tag_origin" );
level.teleport_target PlaySound( "zmb_gersh_teleporter_go" );
wait( 2.0 );
model Delete();
flag_set( "target_teleported" );
}

reroute_power_event() {
monitor = GetEnt( "casimir_monitor", "targetname" );
location = GetStruct( "casimir_monitor_struct", "targetname" );
monitor PlayLoopSound( "zmb_egg_notifier", 1 );
monitor SetModel( "p_zom_monitor_csm_screen_on" );
trig = Spawn( "trigger_radius", location.origin, 0, 32, 60 );
trig wait_for_use( monitor );
trig delete();
flag_set( "rerouted_power" );
monitor SetModel( "p_zom_monitor_csm_screen_logo" );
monitor StopLoopSound( 1 );
level thread play_egg_vox( "vox_ann_egg2_success", "vox_gersh_egg2", 2 );
level thread activate_casimir_light( 1 );
}
wait_for_use( monitor )
{
while(1)
{
self waittill( "trigger", who );
while( IsPlayer(who) && who IsTouching( self ) )
{
if( who UseButtonPressed() )
{
flag_set( "rerouted_power" );
monitor PlaySound( "zmb_comp_activate" );
return;
}
wait(.05);
}
}
}
sync_switch_event() {
switches = GetStructArray( "sync_switch_start", "targetname" );
success = false;
while ( !flag( "switches_synced" ) )
{
flag_wait( "monkey_round" );
array_thread( switches, ::reveal_switch );
self thread switch_watcher();
level waittill_either( "between_round_over", "switches_synced" );
}
level thread play_egg_vox( "vox_ann_egg3_success", "vox_gersh_egg3", 3 );
level thread activate_casimir_light( 2 );
}


reveal_switch()
{
button = Spawn( "script_model", self.origin );
button SetModel( "p_rus_electric_switch_stop" );
button.angles = self.angles + (0,90,0);
button PlayLoopSound( "zmb_egg_notifier", 1 );
offset = AnglesToForward(self.angles) * 8;
time = 1;
button MoveTo( button.origin + offset, 1 );
wait( 1 );
if ( flag( "monkey_round" ) ) {
trig = Spawn( "trigger_radius", button.origin, 0, 32, 72 );
trig thread wait_for_sync_use( self );
level waittill_either( "between_round_over", "switches_synced" );
trig delete();
}
button StopLoopSound( 1 );
button MoveTo( self.origin, time );
wait( time );
button delete();
}

wait_for_sync_use( ss )
{
level endon( "between_round_over" );
level endon( "switches_synced" );
ss.pressed = 0;
while(1)
{
self waittill( "trigger", who );
while( IsPlayer(who) && who IsTouching( self ) )
{
if( who UseButtonPressed() )
{
level notify( "sync_button_pressed" );
playsoundatposition( "zmb_push_button", ss.origin );
ss.pressed = 1;
}
wait(.05);
}
}
}

switch_watcher()
{
level endon( "between_round_over" );
pressed = 0;
switches = GetStructArray( "sync_switch_start", "targetname" );
while (1)
{
level waittill( "sync_button_pressed" );
timeout = GetTime() + 500;
while ( GetTime() {
pressed = 0;
for ( i=0; i {
if ( IsDefined( switches[i].pressed ) && switches[i].pressed )
{
pressed++;
}
}
if ( pressed == 4 )
{
flag_set( "switches_synced" );
for ( i=0; i {
playsoundatposition( "zmb_misc_activate", switches[i].origin );
}
return;
}
wait( 0.05 );
}
switch( pressed )
{
case 1:
case 2:
case 3:
for ( i=0; i {
playsoundatposition( "zmb_deny", switches[i].origin );
}
break;
}
for ( i=0; i {
switches[i].pressed = 0;
}
}
}

pressure_plate_event() {
area = GetStruct( "pressure_pad", "targetname" );
trig = Spawn( "trigger_radius", area.origin, 0, 300, 100 );
trig area_timer( 120 );
trig Delete();
level thread play_egg_vox( "vox_ann_egg4_success", "vox_gersh_egg4", 4 );
level thread activate_casimir_light( 3 );
}

area_timer( time ) {
clock_loc = GetStruct( "pressure_timer", "targetname" );
clock = Spawn( "script_model", clock_loc.origin );
clock SetModel( "p_rus_clock_lrg" );
clock.angles = clock_loc.angles;
clock PlayLoopSound( "zmb_egg_notifier", 1 );
timer_hand_angles_init = ( 270, 90, 0 );
timer_hand = Spawn( "script_model", clock_loc.origin + ( -1, 0, 12 ) );
timer_hand SetModel( "t5_weapon_ballistic_knife_blade" );
timer_hand.angles = timer_hand_angles_init;
step = 1.0;
while ( !flag( "pressure_sustained" ) )
{
self waittill( "trigger" );
stop_timer = false;
players = get_players();
for ( i=0; i {
if ( !players[i] IsTouching( self ) )
{
wait( step );
stop_timer = true;
}
}
if ( stop_timer )
{
continue;
}
self PlaySound( "zmb_pressure_plate_trigger" );
time_remaining = time;
timer_hand RotatePitch( 360, time );
while ( time_remaining )
{
players = get_players();
for ( i=0; i {
if ( !players[i] IsTouching( self ) )
{
wait( step );
time_remaining = time;
stop_timer = true;
timer_hand RotateTo( timer_hand_angles_init, 0.5 );
timer_hand PlaySound( "zmb_deny" );
wait( 0.5 );
break;
}
}
if ( stop_timer )
{
break;
}
wait( step );
time_remaining -= step;
timer_hand PlaySound( "zmb_egg_timer_oneshot" );
}
if ( time_remaining {
flag_set( "pressure_sustained" );
players = get_players();
temp_fx = undefined;
if ( IsDefined( players[0].fx ) )
{
temp_fx = players[0].fx;
}
timer_hand playsound( "zmb_perks_packa_ready" );
players[0].fx = level.zombie_powerups[ "nuke" ].fx;
level thread maps\_zombiemode_powerups::nuke_powerup( players[0] );
clock StopLoopSound( 1 );
wait( 1.0 );
if ( IsDefined( temp_fx ) )
{
players[0].fx = temp_fx;
}
else
{
players[0].fx = undefined;
}
clock Delete();
timer_hand Delete();
return;
}
}
}

lander_passkey_event() {
flag_init( "letter_acquired" );
level.lander_key = [];
level.lander_key[ "lander_station1" ][ "lander_station3" ] = "s";
level.lander_key[ "lander_station1" ][ "lander_station4" ] = "r";
level.lander_key[ "lander_station1" ][ "lander_station5" ] = "e";
level.lander_key[ "lander_station3" ][ "lander_station1" ] = "y";
level.lander_key[ "lander_station3" ][ "lander_station4" ] = "a";
level.lander_key[ "lander_station3" ][ "lander_station5" ] = "i";
level.lander_key[ "lander_station4" ][ "lander_station1" ] = "m";
level.lander_key[ "lander_station4" ][ "lander_station3" ] = "h";
level.lander_key[ "lander_station4" ][ "lander_station5" ] = "u";
level.lander_key[ "lander_station5" ][ "lander_station1" ] = "t";
level.lander_key[ "lander_station5" ][ "lander_station3" ] = "n";
level.lander_key[ "lander_station5" ][ "lander_station4" ] = "l";
level.passkey = array( "l", "u", "n", "a" );
level.passkey_progress = 0;
level.secret1 = array( "h", "i", "t", "s", "a", "m" );
level.secret1_progress = 0;
level.secret2 = array( "h", "y", "e", "n", "a" );
level.secret2_progress = 0;
thread lander_monitor();
flag_wait( "passkey_confirmed" );
level.lander_audio_ent StopLoopSound( 1 );
level thread play_egg_vox( "vox_ann_egg5_success", "vox_gersh_egg5", 5 );
level thread activate_casimir_light( 4 );
wait(1);
level.lander_audio_ent Delete();
}

lander_monitor(){
lander = getent( "lander", "targetname" );
level.lander_audio_ent = Spawn( "script_origin", lander.origin );
level.lander_audio_ent LinkTo( lander );
level.lander_audio_ent PlayLoopSound( "zmb_egg_notifier", 1 );
while ( !flag( "passkey_confirmed" ) ) {
level waittill("lander_launched");
if ( lander.called ) {
start = lander.depart_station;
dest = lander.station;
letter = level.lander_key[ start ][ dest ];
model = level.lander_letters[ letter ];
model Show();
model PlaySound( "zmb_spawn_powerup" );
model thread spin_letter();
model PlayLoopSound( "zmb_spawn_powerup_loop", .5 );
trig = Spawn( "trigger_radius", model.origin, 0, 200, 150 );
trig thread letter_grab( letter, model );
flag_wait("lander_grounded");
if ( !flag( "letter_acquired" ) ) {
level.passkey_progress = 0;
level.secret1_progress = 0;
level.secret2_progress = 0;
} else {
flag_clear( "letter_acquired" );
}
trig delete();
model Hide();
model StopLoopSound( .5 );
} else {
level.passkey_progress = 0;
level.secret1_progress = 0;
level.secret2_progress = 0;
}
}
}


spin_letter() {
level endon( "lander_grounded" );
level endon( "letter_acquired" );
while (1)
{
self RotateYaw( 90, 5 );
wait( 5 );
}
}

letter_grab( letter, model ) {
level endon("lander_grounded");
self waittill( "trigger" );
flag_set( "letter_acquired" );
playsoundatposition("zmb_powerup_grabbed", model.origin);
model Hide();
if ( letter == level.passkey[ level.passkey_progress ] ){
level.passkey_progress++;
if ( level.passkey_progress == level.passkey.size ) {
flag_set( "passkey_confirmed" );
}
} else {
level.passkey_progress = 0;
}

if ( letter == level.secret1[ level.secret1_progress ] ) {
level.secret1_progress++;
if ( level.secret1_progress == level.secret1.size )
{
}
} else {
level.secret1_progress = 0;
}
if ( letter == level.secret2[ level.secret2_progress ] ) {
level.secret2_progress++;
if ( level.secret2_progress == level.secret2.size )
{
}
} else {
level.secret2_progress = 0;
}
}

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();
}
}

bhb_combo_loc_check( grenade, model, info )
{
if ( IsDefined( level.black_hold_bomb_target_trig ) &&
grenade IsTouching( level.black_hold_bomb_target_trig ) )
{
trig = Spawn( "trigger_damage", grenade.origin, 0, 15, 72 );
grenade thread wait_for_combo( trig );
}
return false;
}

wait_for_combo( trig )
{
self endon( "death" );
self thread kill_trig_on_death( trig );
weapon_combo_spot = GetStruct( "weapon_combo_spot", "targetname" );
ray_gun_hit = false;
doll_hit = false;
crossbow_hit = false;
players = get_players();
array_thread( players, ::thundergun_check, self, trig, weapon_combo_spot );
while ( 1 ) {
trig waittill( "damage", amount, attacker, dir, org, mod );
if ( isDefined( attacker ) ) {
if ( mod == "MOD_PROJECTILE_SPLASH" && (attacker GetCurrentWeapon() == "ray_gun_upgraded_zm" ) ) {
ray_gun_hit = true;
} else if ( mod == "MOD_GRENADE_SPLASH" ) {
if ( amount >= 90000 ) {
doll_hit = true;
} else if ( attacker GetCurrentWeapon() == "crossbow_explosive_upgraded_zm" ){
crossbow_hit = true;
}
}
if ( ray_gun_hit && doll_hit && flag( "thundergun_hit" ) ) {
flag_set( "weapons_combined" );
level thread soul_release( self, trig.origin );
return;
}
}
}
}

thundergun_check( model, trig, weapon_combo_spot )
{
model endon( "death" );
while (1) {
self waittill( "weapon_fired" );
if ( self GetCurrentWeapon() == "thundergun_upgraded_zm" ) {
if ( DistanceSquared( self.origin, weapon_combo_spot.origin ) vector_to_spot = VectorNormalize( weapon_combo_spot.origin - self GetWeaponMuzzlePoint() );
vector_player_facing = self GetWeaponForwardDir();
angle_diff = acos( VectorDot( vector_to_spot, vector_player_facing ) );
if ( angle_diff flag_set( "thundergun_hit" );
RadiusDamage( trig.origin, 5, 1, 1, self );
}
}
}
}
}

kill_trig_on_death( trig )
{
self waittill( "death" );
trig delete();
if( flag( "thundergun_hit" ) && !flag( "weapons_combined" ) )
{
level thread play_egg_vox( "vox_ann_egg6p1_success", "vox_gersh_egg6_fail2", 7 );
} else if( !flag( "weapons_combined" ) ){
level thread play_egg_vox( undefined, "vox_gersh_egg6_fail1", 6 );
}
flag_clear( "thundergun_hit" );
}

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[i] 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 );
}

play_egg_vox( ann_alias, gersh_alias, plr_num )
{
if( IsDefined( ann_alias ) )
{
level maps\zombie_cosmodrome_amb::play_cosmo_announcer_vox( ann_alias );
}
if( IsDefined( gersh_alias ) )
{
level maps\zombie_cosmodrome_amb::play_gersh_vox( gersh_alias );
}
if( IsDefined( plr_num ) )
{
players = get_players();
rand = RandomIntRange( 0, players.size );
players[rand] maps\_zombiemode_audio::create_and_play_dialog( "eggs", "gersh_response", undefined, plr_num );
}
}

samantha_is_angry()
{
playsoundatposition( "zmb_samantha_earthquake", (0,0,0) );
playsoundatposition( "zmb_samantha_whispers", (0,0,0) );
wait(6);
level clientnotify( "sia" );
playsoundatposition( "zmb_samantha_scream", (0,0,0) );
}

The above code doesn't cover any of the radios or centrifuge, so there must be more scripts that I haven't seen.

** Edit: See next post for download link.

Link to comment
  • Replies 30
  • Created
  • Last Reply

Top Posters In This Topic

http://www.sendspace.com/file/uqk66n

That's a lot of Zombie code. It doesn't relate to the easter egg, but its interesting. I can understand some of it, of not all of it. Can you translate some of the important stuff into English? i already know a lot of what it means (http://denkirson.proboards.com/index.cg ... hread=2555 has some important stuff that I can understand) Can you translate the rest of it?

Link to comment

http://www.sendspace.com/file/uqk66n

That's a lot of Zombie code. It doesn't relate to the easter egg, but its interesting. I can understand some of it, of not all of it. Can you translate some of the important stuff into English? i already know a lot of what it means (http://denkirson.proboards.com/index.cg ... hread=2555 has some important stuff that I can understand) Can you translate the rest of it?

Thanks for the files. What specific questions do you have? Its rather hard to define what is important.

As for the

level clientnotify( "sia" );

I found a lot of spots where clientnotify is being used, but no locations where it is being read. This leads me to believe that the map it self is reading it. At least its not apart of the code collection of 63 files you linked to.

I found this interesting. Different Zombie Challenges, pry written before Ascension. : sergei, quad, german, engineer, moss_big, dog, and pig (what lol) . I think (guesing) this is the mini 4 player arcade game as its the zombietron_main file.

Link to comment

Was looking though the perks and found out that they programed in random rare drops but its all disabled. It seems there is a lot of extra code of things they where trying to do but decided not to. For instance, there is a check for a rocket trap but it was never implemented. This just hints at some of the design process and how the requirements may of changed as they developed the code.

Time to write a paper, so thats as much investigating I'm doing for now. Post questions and I'll look at them later.

Link to comment

lol....some of the remarks and names of programs within these files are hilarious....

There is a falesafe called "Hack Shit"

Another programmer noted when making the leaderboard programming, "this has gotta be the dumbest way of doing this, but at 1:33am in the morning my brain is fried!"

the same guy remarks that there needs to be a one a day cap on part of the code because, "cap it at like 1 day, need to cap cause you know some muppet is gonna end up trying it"

Link to comment

Ill bump it because I think it's irrelevant. :P And I know people fester with irrelevant info..

Hahaha, the egg is done..

If would could figure it out week 1 of the release, why cant we solve it one month later?

As it done... and if there is a patch, the information is incomplete... and again irrelevant ;)

Link to comment

sia = sam is angry

samantha_is_angry()

{

playsoundatposition( "zmb_samantha_earthquake", (0,0,0) );

playsoundatposition( "zmb_samantha_whispers", (0,0,0) );

wait(6);

level clientnotify( "sia" );

playsoundatposition( "zmb_samantha_scream", (0,0,0) );

}

Client notify i beleive to be for player dialog

there would be a line of code somewhere with the random dialog that will have a tag of 'sia'

so when the script hits

level clientnotify( "sia" );

it will call a random dialog refering to sia

ive heard the players say stuff like "oohhh shes mad"

Link to comment

sia - Sam Is Alive? :o

I think its a passkey or levelkey for sia indicating Sam is angry. I base it on the fact that sam_is_angry is a keypoint reference for different sounds and effects. I think we'd have to delve into more of the code to find out more. Anyone know where I can find it?

*EDIT* What's interesting that I've seen so far are a few references to "level" Cosmodrome. Is there another zombie map in the works involving a Cosmodrome?

Link to comment

Flag is something that is true or false, so if flag_set("someFlag") means that it now true and all code waiting on it will resume.

Example: flag( "switches_synced" ) gets the value of a flag and flag_wait("someFlag") will pause the code till that flag is becomes true with the flag_set

These are a list of the flags that I'm seeing.

Flags:

target_teleported

target_teleported

rerouted_power

switches_synced

pressure_sustained

letter_acquired

passkey_confirmed

weapons_combined

thundergun_hit

Events: (With the "waittill or waittill_either " functions)

sounddone

between_round_over

switches_synced

sync_button_pressed

trigger

lander_launched

damage

weapon_fired

death

It is strange, I am calling them flags as that is what the code says, but it seems more like they are used to set up some kind of Observer Pattern

Link to comment

What about the code about the grenade and black hole bomb/event horizon. mentions teleporting alot.

It sets the target_teleported flag.

When looking at this line:

PlayFXOnTag( level._effect[ "black_hole_bomb_event_horizon" ], level.teleport_target, "tag_origin" );

I looked up the following level._effect values. Note, I don't see the values being set like in other maps. I think that there is a file ending in _fx.gsc that sets what the effects do:

fx_zmb_light_floodlight_bright

switch_sparks

black_hole_bomb_event_horizon

gersh_spark

This is a very few effects (5) compared to the 75 in the pentagon map (zombie_pentagon_fx.gsc) . So going to assume there is missing code still.

I have a suspicion that this is using Function Pointers for the effects and pointers is something that i haven't used in a while and don't consider myself an expert on.

Link to comment

I know the 5th lander thing has been debunked, but does anyone else find it interesting the landers are numbered 1, 3, 4, and 5?

Took a double take at what you wrote and had to look at the code again to confirm:

level.lander_key[ "lander_station1" ][ "lander_station3" ] = "s";

level.lander_key[ "lander_station1" ][ "lander_station4" ] = "r";

level.lander_key[ "lander_station1" ][ "lander_station5" ] = "e";

level.lander_key[ "lander_station3" ][ "lander_station1" ] = "y";

level.lander_key[ "lander_station3" ][ "lander_station4" ] = "a";

level.lander_key[ "lander_station3" ][ "lander_station5" ] = "i";

level.lander_key[ "lander_station4" ][ "lander_station1" ] = "m";

level.lander_key[ "lander_station4" ][ "lander_station3" ] = "h";

level.lander_key[ "lander_station4" ][ "lander_station5" ] = "u";

level.lander_key[ "lander_station5" ][ "lander_station1" ] = "t";

level.lander_key[ "lander_station5" ][ "lander_station3" ] = "n";

level.lander_key[ "lander_station5" ][ "lander_station4" ] = "l";

As a software engineer, I see the uniformity of the wonders of copy and paste. From the looks of this, it was codded with 5 lander stations. My opinion is that the lines referencing station 2 where removed due to design changes.

You know what, assuming my assumption is accurate, then it is reason to believe that there is a design artifact to call the lander to station 2. It is quite possible that the second lander location was never finished but the code in the map may exist for it. If some one can execute a call lander on station 2 with a modified system. There would be a strong possibility that it would fly to that pad that isn't used.

Link to comment

Please post code in code blocks.

This is the section that you where questioning:

	kill_trig_on_death( trig )
{
self waittill( "death" );
trig delete();
if( flag( "thundergun_hit" ) && !flag( "weapons_combined" ) )
{
level thread play_egg_vox( "vox_ann_egg6p1_success", "vox_gersh_egg6_fail2", 7 );
} else if( !flag( "weapons_combined" ) ){
level thread play_egg_vox( undefined, "vox_gersh_egg6_fail1", 6 );
}
flag_clear( "thundergun_hit" );
}

This is the clean up of the Easter egg. So if you die after hitting with the Thunder gun but not the other weapons, vox_gersh_egg6_fail2 will be played.

If you didn't hit with the Thunder gun and the weapons didn't all hit. So you throw gursh but don't do anything. Then vox_gersh_egg6_fail1 will play.

Link to comment

:facepalm: Thanks for trying to tell me how to post on here asshole.

Yes, I will suggest how others will post on this thread as I created it and am managing it.

I believe I answered your first question about the code. If you have any more theories please post them.

Link to comment

It seems like you enjoy having this thread more than trying to figure out how the code actually works. Noticed how this died out so easily? I would think that you'd be more open minded but sadly you'll take your vanity and leave the true thought process to us.

I'm sorry, but I don't see how this thread has died out. Useful information has been posted here and this thread has been reference in several other topics.

As I've said in the past, I'm a Software Engineer with over 5 years of experience. If you or anyone has a valid question about the code or will like to discuss a given topic, then simply ask.

--------

New Related Topics:

WhosOnFirst post on code relating to the rocket trap that was never fully implemented:

http://www.callofdutyzombies.com/forum/viewtopic.php?f=60&t=8302

Link to comment

There's something that interests me here...

Did anyone else notice that there are two different "egg" reference codes? There's an "ann_egg" and a "gersh_egg". With the 4th part of the Gersh light egg, there are two different egg triggers (ann and gersh) which have different success and fail notifications (i.e. "_success" and "_fail"). Are there two different egg subsets here? Is there a certain order/amount that we have to use the weapons to activate the right "_success" flag(s)?

*EDIT* Looking back over the code, I have figured that the "ann" stands for announcer and "gersh" implies Dr. Gersch. I don't know if there are in fact two different voices involved in the egg, I'd have to look back over some of the videos. But now I think we can look more into the egg if things like the announcer might say something versus Gersch might say something.

*EDIT* There is one thing that seems suspicious and intriguing in the code though. Near the end after all of the "weapon_combo" and "thundergun_hit" flags being true or false or what-have-you, there is reference to a "trigger" and more specifically there is one line about "kill_trigger" on "death". The "death" does not seem to have a specific value to it, so it may reference a player death (meaning if a player dies the "trigger" might disappear) or maybe the "gersch death" where the gersch explodes and the "soul" (that little white dot) floats into the sky. Just some ideas). Gonna keep scouring the code...

What function are you looking in?

Link to comment

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 );

}

Link to comment

You say that revive is just in the final step of the egg code incase you go down. Are you kidding? Why wouldn't it be all over the rest of the code right next to everything else? Comprehending what has been said and knowing what each word means in english are two different things is what I'm saying. You may understand the sentence but you don't know what it's saying. zombie_flood_light_bright? Oh thats just a light and its bright. Where it is in the code has no meaning right?

If you're going to insult someone, you might want to make sure you don't make yourself out to be an idiot instead.

The reason why revive is only in the last step is exactly as said, it's in case you go down. Assuming a player went down while doing the last step, the game does two things.

It first has to go through the code of gersh's soul "death" which has a timer in it to give the players time to revive themself.

Second, in case the player wasn't revived in time the game puts in a safeguard.

If a player is pressing X and a player is getting revived

Wait 1 (or however long it takes to revive someone w/o quick revive)

After the game waits the time, it moves on. By the time the code has moved on, the player will have been revived.

It then gives the players the death machines

Another reason why it's there, is because it is the END of the code. If you fail at any of the other steps, some, or all or that step resets, and waits for completion. If you move off of the pad then the clock resets. If the buttons arn't pressed and time between rounds expires, then the buttons move back into the wall, and won't appear until the next time the trigger of a monkey round occurs.

Do you understand that? Or just because I've written down the words don't you get the meaning?

Seriously, no one here likes an ass, and no one likes an ass who doesn't know what they are talking about.

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. .