You are viewing our Forum Archives. To view or take place in current topics click here.
Where's Your Hammer At?
I have a hammer in my shed!
18.18% (2 votes)
18.18% (2 votes)
I sleep with a hammer under my pillow o.0
81.82% (9 votes)
81.82% (9 votes)
Total Votes: 11
[Release] Working Carpenter on Every Map
Posted:
[Release] Working Carpenter on Every MapPosted:
Status: Offline
Joined: May 15, 201113Year Member
Posts: 350
Reputation Power: 26
Status: Offline
Joined: May 15, 201113Year Member
Posts: 350
Reputation Power: 26
Working Carpenter Code, Tested it and it works on every map. The sounds only work on Der Riese obviously... Have Fun
Works On Every Map
Credit To: Treyarch for the code lol, don't like copy and paste from GSCs... LIKE MY A.SS
Yes the code is big... Who gives a flying f.uck
start_carpenter( origin )
{
level thread play_devil_dialog( "carp_vox" );
window_boards = getstructarray( "exterior_goal", "targetname" );
total = level.exterior_goals.size;
carp_ent = spawn( "script_origin", ( 0, 0, 0 ) );
carp_ent playloopsound( "carp_loop" );
while( true )
{
windows = get_closest_window_repair( window_boards, origin );
if( !IsDefined( windows ) )
{
carp_ent stoploopsound( 1 );
carp_ent playsound( "carp_end", "sound_done" );
carp_ent waittill( "sound_done" );
break;
}
else
window_boards = array_remove(window_boards, windows);
while( 1 )
{
if( all_chunks_intact( windows.barrier_chunks ) )
{
break;
}
chunk = get_random_destroyed_chunk( windows.barrier_chunks );
if( !IsDefined( chunk ) )
break;
windows thread replace_chunk( chunk, false, true );
windows.clip enable_trigger();
windows.clip DisconnectPaths();
wait_network_frame();
wait .05;
}
wait_network_frame();
}
players = get_players();
for( i = 0; i < players.size; i++ )
{
players[i].score += 200;
players[i].score_total += 200;
players[i] maps\_zombiemode_score::set_player_score_hud();
}
carp_ent delete();
}
get_closest_window_repair( windows, origin )
{
current_window = undefined;
shortest_distance = undefined;
for( i = 0; i < windows.size; i++ )
{
if( all_chunks_intact( windows[i].barrier_chunks ) )
continue;
if( !IsDefined( current_window ) )
{
current_window = windows[i];
shortest_distance = DistanceSquared( current_window.origin, origin );
}
else
{
if( DistanceSquared( windows[i].origin, origin ) < shortest_distance )
{
current_window = windows[i];
shortest_distance = DistanceSquared( windows[i].origin, origin );
}
}
}
return current_window;
}
play_devil_dialog( sound_to_play )
{
if( !IsDefined( level.devil_is_speaking ) )
{
level.devil_is_speaking = 0;
}
if( level.devil_is_speaking == 0 )
{
level.devil_is_speaking = 1;
really_play_2D_sound( sound_to_play );
wait 2.0;
level.devil_is_speaking =0;
}
}
really_play_2D_sound( sound )
{
temp_ent = spawn( "script_origin", ( 0, 0, 0 ) );
temp_ent playsound( sound, sound + "wait" );
temp_ent waittill( sound + "wait" );
wait .05;
temp_ent delete();
}
enable_trigger()
{
if( !IsDefined( self.disabled ) || !self.disabled )
{
return;
}
self.disabled = false;
self.origin = self.origin + ( 0, 0, 10000 );
}
get_random_destroyed_chunk( barrier_chunks )
{
chunk = undefined;
chunks = get_destroyed_chunks( barrier_chunks );
if( IsDefined( chunks ) )
{
return chunks[RandomInt( chunks.size )];
}
return undefined;
}
get_destroyed_chunks( barrier_chunks )
{
array = [];
for( i = 0; i < barrier_chunks.size; i++ )
{
if( barrier_chunks[i].destroyed && !isdefined( barrier_chunks[i].mid_repair ) )
{
array[array.size] = barrier_chunks[i];
}
}
if( array.size == 0 )
{
return undefined;
}
return array;
}
all_chunks_intact( barrier_chunks )
{
for( i = 0; i < barrier_chunks.size; i++ )
{
if( barrier_chunks[i].destroyed && !IsDefined( barrier_chunks[i].mid_repair ) )
{
return false;
}
}
return true;
}
replace_chunk( chunk, has_perk, via_powerup )
{
if(! IsDefined( has_perk ) )
{
has_perk = false;
}
assert( IsDefined( chunk.og_origin ) );
assert( !IsDefined( chunk.mid_repair ) );
chunk.mid_repair = true;
chunk Show();
sound = "rebuild_barrier_hover";
if( IsDefined( chunk.script_presound ) )
{
sound = chunk.script_presound;
}
if( !isdefined( via_powerup ) )
{
PlaySoundAtPosition( sound, chunk.origin );
}
only_z = ( chunk.origin[0], chunk.origin[1], chunk.og_origin[2] );
if( has_perk == true )
{
chunk RotateTo( ( 0, 0, 0 ), 0.15 );
chunk waittill_notify_or_timeout( "rotatedone", 1 );
wait( 0.1 );
}
else
{
chunk MoveTo( only_z, 0.15 );
chunk RotateTo( ( 0, 0, 0 ), 0.3 );
chunk waittill_notify_or_timeout( "rotatedone", 1 );
wait( 0.2 );
}
if( has_perk == true )
{
chunk MoveTo( chunk.og_origin, 0.05 );
}
else
{
chunk MoveTo( chunk.og_origin, 0.1 );
}
chunk waittill_notify_or_timeout( "movedone", 1 );
assert( chunk.origin == chunk.og_origin );
chunk.target_by_zombie = undefined;
chunk.destroyed = false;
assert( chunk.mid_repair == true );
chunk.mid_repair = undefined;
sound = "barrier_rebuild_slam";
if( IsDefined( self.script_ender ) )
{
sound = self.script_ender;
}
chunk Solid();
fx = "wood_chunk_destory";
if( IsDefined( self.script_fxid ) )
{
fx = self.script_fxid;
}
if( !IsDefined( via_powerup ) )
{
PlaySoundAtPosition( sound, chunk.origin );
playfx( level._effect[fx], chunk.origin );
}
if( !Isdefined( self.clip ) )
{
chunk Disconnectpaths();
}
}
The following 3 users thanked Mikeeeey for this useful post:
#2. Posted:
Status: Offline
Joined: Aug 09, 200915Year Member
Posts: 6,493
Reputation Power: 8063
Motto: The Original Bunny
Motto: The Original Bunny
Status: Offline
Joined: Aug 09, 200915Year Member
Posts: 6,493
Reputation Power: 8063
Motto: The Original Bunny
Mikeeey wroteWorking Carpenter Code, Tested it and it works on every map. The sounds only work on Der Riese obviously... Have Fun
Works On Every Map
Credit To: Treyarch for the code lol, don't like copy and paste from GSCs... LIKE MY A.SS
Yes the code is big... Who gives a flying f.uck
start_carpenter( origin )
{
level thread play_devil_dialog( "carp_vox" );
window_boards = getstructarray( "exterior_goal", "targetname" );
total = level.exterior_goals.size;
carp_ent = spawn( "script_origin", ( 0, 0, 0 ) );
carp_ent playloopsound( "carp_loop" );
while( true )
{
windows = get_closest_window_repair( window_boards, origin );
if( !IsDefined( windows ) )
{
carp_ent stoploopsound( 1 );
carp_ent playsound( "carp_end", "sound_done" );
carp_ent waittill( "sound_done" );
break;
}
else
window_boards = array_remove(window_boards, windows);
while( 1 )
{
if( all_chunks_intact( windows.barrier_chunks ) )
{
break;
}
chunk = get_random_destroyed_chunk( windows.barrier_chunks );
if( !IsDefined( chunk ) )
break;
windows thread replace_chunk( chunk, false, true );
windows.clip enable_trigger();
windows.clip DisconnectPaths();
wait_network_frame();
wait .05;
}
wait_network_frame();
}
players = get_players();
for( i = 0; i < players.size; i++ )
{
players[i].score += 200;
players[i].score_total += 200;
players[i] maps\_zombiemode_score::set_player_score_hud();
}
carp_ent delete();
}
get_closest_window_repair( windows, origin )
{
current_window = undefined;
shortest_distance = undefined;
for( i = 0; i < windows.size; i++ )
{
if( all_chunks_intact( windows[i].barrier_chunks ) )
continue;
if( !IsDefined( current_window ) )
{
current_window = windows[i];
shortest_distance = DistanceSquared( current_window.origin, origin );
}
else
{
if( DistanceSquared( windows[i].origin, origin ) < shortest_distance )
{
current_window = windows[i];
shortest_distance = DistanceSquared( windows[i].origin, origin );
}
}
}
return current_window;
}
play_devil_dialog( sound_to_play )
{
if( !IsDefined( level.devil_is_speaking ) )
{
level.devil_is_speaking = 0;
}
if( level.devil_is_speaking == 0 )
{
level.devil_is_speaking = 1;
really_play_2D_sound( sound_to_play );
wait 2.0;
level.devil_is_speaking =0;
}
}
really_play_2D_sound( sound )
{
temp_ent = spawn( "script_origin", ( 0, 0, 0 ) );
temp_ent playsound( sound, sound + "wait" );
temp_ent waittill( sound + "wait" );
wait .05;
temp_ent delete();
}
enable_trigger()
{
if( !IsDefined( self.disabled ) || !self.disabled )
{
return;
}
self.disabled = false;
self.origin = self.origin + ( 0, 0, 10000 );
}
get_random_destroyed_chunk( barrier_chunks )
{
chunk = undefined;
chunks = get_destroyed_chunks( barrier_chunks );
if( IsDefined( chunks ) )
{
return chunks[RandomInt( chunks.size )];
}
return undefined;
}
get_destroyed_chunks( barrier_chunks )
{
array = [];
for( i = 0; i < barrier_chunks.size; i++ )
{
if( barrier_chunks[i].destroyed && !isdefined( barrier_chunks[i].mid_repair ) )
{
array[array.size] = barrier_chunks[i];
}
}
if( array.size == 0 )
{
return undefined;
}
return array;
}
all_chunks_intact( barrier_chunks )
{
for( i = 0; i < barrier_chunks.size; i++ )
{
if( barrier_chunks[i].destroyed && !IsDefined( barrier_chunks[i].mid_repair ) )
{
return false;
}
}
return true;
}
replace_chunk( chunk, has_perk, via_powerup )
{
if(! IsDefined( has_perk ) )
{
has_perk = false;
}
assert( IsDefined( chunk.og_origin ) );
assert( !IsDefined( chunk.mid_repair ) );
chunk.mid_repair = true;
chunk Show();
sound = "rebuild_barrier_hover";
if( IsDefined( chunk.script_presound ) )
{
sound = chunk.script_presound;
}
if( !isdefined( via_powerup ) )
{
PlaySoundAtPosition( sound, chunk.origin );
}
only_z = ( chunk.origin[0], chunk.origin[1], chunk.og_origin[2] );
if( has_perk == true )
{
chunk RotateTo( ( 0, 0, 0 ), 0.15 );
chunk waittill_notify_or_timeout( "rotatedone", 1 );
wait( 0.1 );
}
else
{
chunk MoveTo( only_z, 0.15 );
chunk RotateTo( ( 0, 0, 0 ), 0.3 );
chunk waittill_notify_or_timeout( "rotatedone", 1 );
wait( 0.2 );
}
if( has_perk == true )
{
chunk MoveTo( chunk.og_origin, 0.05 );
}
else
{
chunk MoveTo( chunk.og_origin, 0.1 );
}
chunk waittill_notify_or_timeout( "movedone", 1 );
assert( chunk.origin == chunk.og_origin );
chunk.target_by_zombie = undefined;
chunk.destroyed = false;
assert( chunk.mid_repair == true );
chunk.mid_repair = undefined;
sound = "barrier_rebuild_slam";
if( IsDefined( self.script_ender ) )
{
sound = self.script_ender;
}
chunk Solid();
fx = "wood_chunk_destory";
if( IsDefined( self.script_fxid ) )
{
fx = self.script_fxid;
}
if( !IsDefined( via_powerup ) )
{
PlaySoundAtPosition( sound, chunk.origin );
playfx( level._effect[fx], chunk.origin );
}
if( !Isdefined( self.clip ) )
{
chunk Disconnectpaths();
}
}
Now this, this is a win.
Shorter code:
maps/_zombiemode_powerups.gsc::start_carpenter(self.origin);
Last edited by coolbunny1234 ; edited 1 time in total
- 1useful
- 1not useful
#3. Posted:
Status: Offline
Joined: Dec 08, 201014Year Member
Posts: 758
Reputation Power: 29
Status: Offline
Joined: Dec 08, 201014Year Member
Posts: 758
Reputation Power: 29
umm,, i know this is beyond a noobie question.. but what is this...
- 0useful
- 0not useful
#4. Posted:
Status: Offline
Joined: Jan 14, 201113Year Member
Posts: 2,919
Reputation Power: 165
Status: Offline
Joined: Jan 14, 201113Year Member
Posts: 2,919
Reputation Power: 165
Buckshot4 wrote umm,, i know this is beyond a noobie question.. but what is this...
make a mod menu.
pu an option to i dont know.
"Board all windows" or "Give Carpanter"
Use that code to make it work "P
- 0useful
- 0not useful
#5. Posted:
Status: Offline
Joined: Oct 09, 201014Year Member
Posts: 987
Reputation Power: 64
Status: Offline
Joined: Oct 09, 201014Year Member
Posts: 987
Reputation Power: 64
coolbunny1234 wroteMikeeey wroteWorking Carpenter Code, Tested it and it works on every map. The sounds only work on Der Riese obviously... Have Fun
Works On Every Map
Credit To: Treyarch for the code lol, don't like copy and paste from GSCs... LIKE MY A.SS
Yes the code is big... Who gives a flying f.uck
start_carpenter( origin )
{
level thread play_devil_dialog( "carp_vox" );
window_boards = getstructarray( "exterior_goal", "targetname" );
total = level.exterior_goals.size;
carp_ent = spawn( "script_origin", ( 0, 0, 0 ) );
carp_ent playloopsound( "carp_loop" );
while( true )
{
windows = get_closest_window_repair( window_boards, origin );
if( !IsDefined( windows ) )
{
carp_ent stoploopsound( 1 );
carp_ent playsound( "carp_end", "sound_done" );
carp_ent waittill( "sound_done" );
break;
}
else
window_boards = array_remove(window_boards, windows);
while( 1 )
{
if( all_chunks_intact( windows.barrier_chunks ) )
{
break;
}
chunk = get_random_destroyed_chunk( windows.barrier_chunks );
if( !IsDefined( chunk ) )
break;
windows thread replace_chunk( chunk, false, true );
windows.clip enable_trigger();
windows.clip DisconnectPaths();
wait_network_frame();
wait .05;
}
wait_network_frame();
}
players = get_players();
for( i = 0; i < players.size; i++ )
{
players[i].score += 200;
players[i].score_total += 200;
players[i] maps\_zombiemode_score::set_player_score_hud();
}
carp_ent delete();
}
get_closest_window_repair( windows, origin )
{
current_window = undefined;
shortest_distance = undefined;
for( i = 0; i < windows.size; i++ )
{
if( all_chunks_intact( windows[i].barrier_chunks ) )
continue;
if( !IsDefined( current_window ) )
{
current_window = windows[i];
shortest_distance = DistanceSquared( current_window.origin, origin );
}
else
{
if( DistanceSquared( windows[i].origin, origin ) < shortest_distance )
{
current_window = windows[i];
shortest_distance = DistanceSquared( windows[i].origin, origin );
}
}
}
return current_window;
}
play_devil_dialog( sound_to_play )
{
if( !IsDefined( level.devil_is_speaking ) )
{
level.devil_is_speaking = 0;
}
if( level.devil_is_speaking == 0 )
{
level.devil_is_speaking = 1;
really_play_2D_sound( sound_to_play );
wait 2.0;
level.devil_is_speaking =0;
}
}
really_play_2D_sound( sound )
{
temp_ent = spawn( "script_origin", ( 0, 0, 0 ) );
temp_ent playsound( sound, sound + "wait" );
temp_ent waittill( sound + "wait" );
wait .05;
temp_ent delete();
}
enable_trigger()
{
if( !IsDefined( self.disabled ) || !self.disabled )
{
return;
}
self.disabled = false;
self.origin = self.origin + ( 0, 0, 10000 );
}
get_random_destroyed_chunk( barrier_chunks )
{
chunk = undefined;
chunks = get_destroyed_chunks( barrier_chunks );
if( IsDefined( chunks ) )
{
return chunks[RandomInt( chunks.size )];
}
return undefined;
}
get_destroyed_chunks( barrier_chunks )
{
array = [];
for( i = 0; i < barrier_chunks.size; i++ )
{
if( barrier_chunks[i].destroyed && !isdefined( barrier_chunks[i].mid_repair ) )
{
array[array.size] = barrier_chunks[i];
}
}
if( array.size == 0 )
{
return undefined;
}
return array;
}
all_chunks_intact( barrier_chunks )
{
for( i = 0; i < barrier_chunks.size; i++ )
{
if( barrier_chunks[i].destroyed && !IsDefined( barrier_chunks[i].mid_repair ) )
{
return false;
}
}
return true;
}
replace_chunk( chunk, has_perk, via_powerup )
{
if(! IsDefined( has_perk ) )
{
has_perk = false;
}
assert( IsDefined( chunk.og_origin ) );
assert( !IsDefined( chunk.mid_repair ) );
chunk.mid_repair = true;
chunk Show();
sound = "rebuild_barrier_hover";
if( IsDefined( chunk.script_presound ) )
{
sound = chunk.script_presound;
}
if( !isdefined( via_powerup ) )
{
PlaySoundAtPosition( sound, chunk.origin );
}
only_z = ( chunk.origin[0], chunk.origin[1], chunk.og_origin[2] );
if( has_perk == true )
{
chunk RotateTo( ( 0, 0, 0 ), 0.15 );
chunk waittill_notify_or_timeout( "rotatedone", 1 );
wait( 0.1 );
}
else
{
chunk MoveTo( only_z, 0.15 );
chunk RotateTo( ( 0, 0, 0 ), 0.3 );
chunk waittill_notify_or_timeout( "rotatedone", 1 );
wait( 0.2 );
}
if( has_perk == true )
{
chunk MoveTo( chunk.og_origin, 0.05 );
}
else
{
chunk MoveTo( chunk.og_origin, 0.1 );
}
chunk waittill_notify_or_timeout( "movedone", 1 );
assert( chunk.origin == chunk.og_origin );
chunk.target_by_zombie = undefined;
chunk.destroyed = false;
assert( chunk.mid_repair == true );
chunk.mid_repair = undefined;
sound = "barrier_rebuild_slam";
if( IsDefined( self.script_ender ) )
{
sound = self.script_ender;
}
chunk Solid();
fx = "wood_chunk_destory";
if( IsDefined( self.script_fxid ) )
{
fx = self.script_fxid;
}
if( !IsDefined( via_powerup ) )
{
PlaySoundAtPosition( sound, chunk.origin );
playfx( level._effect[fx], chunk.origin );
}
if( !Isdefined( self.clip ) )
{
chunk Disconnectpaths();
}
}
Now this, this is a win.
Shorter code:
maps/_zombiemode_powerups.gsc::start_carpenter(self.origin);
coolbunny, thats a real win right there
- 1useful
- 0not useful
#6. Posted:
Status: Offline
Joined: May 16, 201113Year Member
Posts: 1,062
Reputation Power: 78
Status: Offline
Joined: May 16, 201113Year Member
Posts: 1,062
Reputation Power: 78
cool cool i like i wanna design my own patch one day
- 0useful
- 0not useful
#7. Posted:
Status: Offline
Joined: Jun 28, 201113Year Member
Posts: 91
Reputation Power: 4
Status: Offline
Joined: Jun 28, 201113Year Member
Posts: 91
Reputation Power: 4
I LOL@TREYARCH, i do like there zombie's though.
- 0useful
- 0not useful
#8. Posted:
Status: Offline
Joined: Dec 07, 201014Year Member
Posts: 2,976
Reputation Power: 3412
Status: Offline
Joined: Dec 07, 201014Year Member
Posts: 2,976
Reputation Power: 3412
wow you think trearch would at least try to patch these
- 0useful
- 0not useful
#9. Posted:
Status: Offline
Joined: Mar 04, 201014Year Member
Posts: 2,891
Reputation Power: 150
iReWiinDz_x wrote Thanks i was thinking that could be the sound when you open up the mod menu i would love to make a waw mod menu but if i used a base someone would complain it was theres ..
Wise One Gravedigging?
Cool code!
- 0useful
- 0not useful
#10. Posted:
Status: Offline
Joined: May 15, 201113Year Member
Posts: 350
Reputation Power: 26
Status: Offline
Joined: May 15, 201113Year Member
Posts: 350
Reputation Power: 26
coolbunny1234 wroteMikeeey wroteWorking Carpenter Code, Tested it and it works on every map. The sounds only work on Der Riese obviously... Have Fun
Works On Every Map
Credit To: Treyarch for the code lol, don't like copy and paste from GSCs... LIKE MY A.SS
Yes the code is big... Who gives a flying f.uck
start_carpenter( origin )
{
level thread play_devil_dialog( "carp_vox" );
window_boards = getstructarray( "exterior_goal", "targetname" );
total = level.exterior_goals.size;
carp_ent = spawn( "script_origin", ( 0, 0, 0 ) );
carp_ent playloopsound( "carp_loop" );
while( true )
{
windows = get_closest_window_repair( window_boards, origin );
if( !IsDefined( windows ) )
{
carp_ent stoploopsound( 1 );
carp_ent playsound( "carp_end", "sound_done" );
carp_ent waittill( "sound_done" );
break;
}
else
window_boards = array_remove(window_boards, windows);
while( 1 )
{
if( all_chunks_intact( windows.barrier_chunks ) )
{
break;
}
chunk = get_random_destroyed_chunk( windows.barrier_chunks );
if( !IsDefined( chunk ) )
break;
windows thread replace_chunk( chunk, false, true );
windows.clip enable_trigger();
windows.clip DisconnectPaths();
wait_network_frame();
wait .05;
}
wait_network_frame();
}
players = get_players();
for( i = 0; i < players.size; i++ )
{
players[i].score += 200;
players[i].score_total += 200;
players[i] maps\_zombiemode_score::set_player_score_hud();
}
carp_ent delete();
}
get_closest_window_repair( windows, origin )
{
current_window = undefined;
shortest_distance = undefined;
for( i = 0; i < windows.size; i++ )
{
if( all_chunks_intact( windows[i].barrier_chunks ) )
continue;
if( !IsDefined( current_window ) )
{
current_window = windows[i];
shortest_distance = DistanceSquared( current_window.origin, origin );
}
else
{
if( DistanceSquared( windows[i].origin, origin ) < shortest_distance )
{
current_window = windows[i];
shortest_distance = DistanceSquared( windows[i].origin, origin );
}
}
}
return current_window;
}
play_devil_dialog( sound_to_play )
{
if( !IsDefined( level.devil_is_speaking ) )
{
level.devil_is_speaking = 0;
}
if( level.devil_is_speaking == 0 )
{
level.devil_is_speaking = 1;
really_play_2D_sound( sound_to_play );
wait 2.0;
level.devil_is_speaking =0;
}
}
really_play_2D_sound( sound )
{
temp_ent = spawn( "script_origin", ( 0, 0, 0 ) );
temp_ent playsound( sound, sound + "wait" );
temp_ent waittill( sound + "wait" );
wait .05;
temp_ent delete();
}
enable_trigger()
{
if( !IsDefined( self.disabled ) || !self.disabled )
{
return;
}
self.disabled = false;
self.origin = self.origin + ( 0, 0, 10000 );
}
get_random_destroyed_chunk( barrier_chunks )
{
chunk = undefined;
chunks = get_destroyed_chunks( barrier_chunks );
if( IsDefined( chunks ) )
{
return chunks[RandomInt( chunks.size )];
}
return undefined;
}
get_destroyed_chunks( barrier_chunks )
{
array = [];
for( i = 0; i < barrier_chunks.size; i++ )
{
if( barrier_chunks[i].destroyed && !isdefined( barrier_chunks[i].mid_repair ) )
{
array[array.size] = barrier_chunks[i];
}
}
if( array.size == 0 )
{
return undefined;
}
return array;
}
all_chunks_intact( barrier_chunks )
{
for( i = 0; i < barrier_chunks.size; i++ )
{
if( barrier_chunks[i].destroyed && !IsDefined( barrier_chunks[i].mid_repair ) )
{
return false;
}
}
return true;
}
replace_chunk( chunk, has_perk, via_powerup )
{
if(! IsDefined( has_perk ) )
{
has_perk = false;
}
assert( IsDefined( chunk.og_origin ) );
assert( !IsDefined( chunk.mid_repair ) );
chunk.mid_repair = true;
chunk Show();
sound = "rebuild_barrier_hover";
if( IsDefined( chunk.script_presound ) )
{
sound = chunk.script_presound;
}
if( !isdefined( via_powerup ) )
{
PlaySoundAtPosition( sound, chunk.origin );
}
only_z = ( chunk.origin[0], chunk.origin[1], chunk.og_origin[2] );
if( has_perk == true )
{
chunk RotateTo( ( 0, 0, 0 ), 0.15 );
chunk waittill_notify_or_timeout( "rotatedone", 1 );
wait( 0.1 );
}
else
{
chunk MoveTo( only_z, 0.15 );
chunk RotateTo( ( 0, 0, 0 ), 0.3 );
chunk waittill_notify_or_timeout( "rotatedone", 1 );
wait( 0.2 );
}
if( has_perk == true )
{
chunk MoveTo( chunk.og_origin, 0.05 );
}
else
{
chunk MoveTo( chunk.og_origin, 0.1 );
}
chunk waittill_notify_or_timeout( "movedone", 1 );
assert( chunk.origin == chunk.og_origin );
chunk.target_by_zombie = undefined;
chunk.destroyed = false;
assert( chunk.mid_repair == true );
chunk.mid_repair = undefined;
sound = "barrier_rebuild_slam";
if( IsDefined( self.script_ender ) )
{
sound = self.script_ender;
}
chunk Solid();
fx = "wood_chunk_destory";
if( IsDefined( self.script_fxid ) )
{
fx = self.script_fxid;
}
if( !IsDefined( via_powerup ) )
{
PlaySoundAtPosition( sound, chunk.origin );
playfx( level._effect[fx], chunk.origin );
}
if( !Isdefined( self.clip ) )
{
chunk Disconnectpaths();
}
}
Now this, this is a win.
Shorter code:
maps/_zombiemode_powerups.gsc::start_carpenter(self.origin);
Der Riese only lol, this code enables it to work for all maps
- 0useful
- 0not useful
You are viewing our Forum Archives. To view or take place in current topics click here.