Author |
Topic: I need some help with this please (LunarLander) |
|
Category: CoDWW Zombie/Co-Op Mapping Posted: Tuesday, Mar. 6, 2012 07:46 pm |
|
I am trying to make it so this lunarlander has to be hold the use button and not just press it. Ive looked everywhere but i cant seem to find an answer. here is the script for it. i took it from a compressed .ff file and used prettyprinter to change it which is why it looks messed up.
Code: }
doLunarLander(){
if( IsSubStr( level.script, "nazi_zombie_factory" ) && self GetFortStatus() == "SpotAvail" ){
for( i = 0;
i <
get_players().size;
i++ ){
get_players()[i].OnLunar = false;
}
level.LunarsSpwnd = true;
self iPrintln( "Lunar Landers ^2Spawned" );
self thread LunaRModels();
self thread LunaR();
self thread LunaR2();
self thread LunarFxCircle();
}
}
LunaRModels(){
level.LunarInUse = false;
level.LunarPosition = "Spawn";
SpawnPos = ( 52, -440, -1.2 );
level._effect["zombie_flashback_american"] = loadfx( "maps/zombie/fx_zombie_flashback_american" );
playfx( level._effect["zombie_flashback_american"], SpawnPos );
playfx( level._effect["zombie_flashback_american"], SpawnPos );
playfx( level._effect["zombie_flashback_american"], ( 300, -1640, 58 ) );
playfx( level._effect["zombie_flashback_american"], ( 300, -1640, 58 ) );
level.Lunar1 = spawn( "script_model", SpawnPos );
level.Lunar1 setmodel( "zombie_teleporter_pad" );
level.Lunar2 = spawn( "script_model", level.Lunar1.origin );
level.Lunar2 setModel( level.Lunar1.model );
level.Lunar2.angles = ( -180, 0, 0 );
level.Lunar2 linkto( level.Lunar1 );
level.PlayerOrig0 = spawn( "script_model", level.Lunar1.origin + ( 0, 50, 20 ) );
level.PlayerOrig0 linkto( level.Lunar1 );
level.PlayerOrig1 = spawn( "script_model", level.Lunar1.origin + ( 0, -50, 20 ) );
level.PlayerOrig1 linkto( level.Lunar1 );
level.PlayerOrig2 = spawn( "script_model", level.Lunar1.origin + ( 50, 0, 20 ) );
level.PlayerOrig2 linkto( level.Lunar1 );
level.PlayerOrig3 = spawn( "script_model", level.Lunar1.origin + ( -50, 0, 20 ) );
level.PlayerOrig3 linkto( level.Lunar1 );
level.CtrlPan = spawn( "script_model", level.Lunar1.origin + ( 0, -8, 40 ) );
level.CtrlPan setmodel( "zombie_teleporter_control_panel" );
level.CtrlPan linkto( level.Lunar1 );
level.CtrlPan2 = spawn( "script_model", level.Lunar1.origin + ( 0, 8, 40 ) );
level.CtrlPan2 setmodel( level.CtrlPan.model );
level.CtrlPan2.angles = ( 0, 180, 0 );
level.CtrlPan2 linkto( level.Lunar1 );
for( i = 0;
i <
get_players().size;
i++ ){
get_players()[i].OnLunar = false;
}
}
LunaR(){
level.LunaTrig = Spawn( "trigger_radius", level.Lunar1.origin, 1, 50, 20 );
level.LunaTrig SetCursorHint( "HINT_NOICON" );
level.LunaTrig SetHintString( "Press & Hold &&1 To Use Lunar Lander" );
for(;
;
){
level.LunaTrig waittill( "trigger", i );
if( i UseButtonPressed() && level.LunarPosition == "Spawn" && i.is_zombie == false && level.LunarInUse == false ){
level.LunarInUse = true;
playsoundatposition( "pa_buzz", ( 52, -440, -1.2 ) );
level.LunaTrig SetHintString( "Lunar Lander In Use" );
level.LunaTrig2 SetHintString( "Lunar Lander In Use" );
i LunarSpawn2Dest();
level.LunarPosition = "Destination";
level.LunarInUse = false;
level.LunaTrig SetHintString( "Press & Hold &&1 To Call Lunar Lander" );
level.LunaTrig2 SetHintString( "Press & Hold &&1 To Use Lunar Lander" );
}
if( i UseButtonPressed() && level.LunarPosition == "Destination" && i.is_zombie == false && level.LunarInUse == false ){
level.LunarInUse = true;
playsoundatposition( "pa_buzz", ( 52, -440, -1.2 ) );
level.LunaTrig SetHintString( "Lunar Lander In Use" );
level.LunaTrig2 SetHintString( "Lunar Lander In Use" );
i LunarDest2Spawn();
level.LunarPosition = "Spawn";
level.LunarInUse = false;
level.LunaTrig SetHintString( "Press & Hold &&1 To Use Lunar Lander" );
level.LunaTrig2 SetHintString( "Press & Hold &&1 To Call Lunar Lander" );
}
}
}
LunaR2(){
DestPos = ( 300, -1640, 58 );
level.LunaTrig2 = Spawn( "trigger_radius", DestPos, 1, 50, 20 );
level.LunaTrig2 SetCursorHint( "HINT_NOICON" );
level.LunaTrig2 SetHintString( "Press & Hold &&1 To Call Lunar Lander" );
for(;
;
){
level.LunaTrig2 waittill( "trigger", i );
if( i UseButtonPressed() && level.LunarPosition == "Spawn" && i.is_zombie == false && level.LunarInUse == false ){
level.LunarInUse = true;
playsoundatposition( "pa_buzz", DestPos );
level.LunaTrig SetHintString( "Lunar Lander In Use" );
level.LunaTrig2 SetHintString( "Lunar Lander In Use" );
i LunarSpawn2Dest();
level.LunarPosition = "Destination";
level.LunarInUse = false;
level.LunaTrig SetHintString( "Press & Hold &&1 To Call Lunar Lander" );
level.LunaTrig2 SetHintString( "Press & Hold &&1 To Use Lunar Lander" );
}
if( i UseButtonPressed() && level.LunarPosition == "Destination" && i.is_zombie == false && level.LunarInUse == false ){
level.LunarInUse = true;
playsoundatposition( "pa_buzz", DestPos );
level.LunaTrig SetHintString( "Lunar Lander In Use" );
level.LunaTrig2 SetHintString( "Lunar Lander In Use" );
i LunarDest2Spawn();
level.LunarPosition = "Spawn";
level.LunarInUse = false;
level.LunaTrig SetHintString( "Press & Hold &&1 To Use Lunar Lander" );
level.LunaTrig2 SetHintString( "Press & Hold &&1 To Call Lunar Lander" );
}
}
}
LunarSpawn2Dest(){
self thread PlayerCheck( 0, level.PlayerOrig0 );
self thread PlayerCheck( 1, level.PlayerOrig1 );
self thread PlayerCheck( 2, level.PlayerOrig2 );
self thread PlayerCheck( 3, level.PlayerOrig3 );
self thread LunarEffect();
self thread LunarNuke();
self thread LunarFx( ( 52, -440, -1.2 ) );
self thread LunarPowerUp( ( -163.83, -836.333, 719 ) );
level.Lunar1 moveto( ( 85, -450, 699 ), 3, .5 );
level.Lunar1 vibrate( ( 0, -100, 0 ), 1.5, .4, 3 );
level.Lunar1 waittill( "movedone" );
wait .2;
level.Lunar1 moveto( ( 300, -1640, 699 ), 6 );
level.Lunar1 waittill( "movedone" );
wait .2;
self thread KillAll( ( 300, -1640, 58 ) );
level.Lunar1 moveto( ( 300, -1640, 58 ), 3, 0, .5 );
level.Lunar1 vibrate( ( 0, -100, 0 ), 1.5, .4, 3 );
level.Lunar1 waittill( "movedone" );
self PlayerUnlink( 0 );
self PlayerUnlink( 1 );
self PlayerUnlink( 2 );
self PlayerUnlink( 3 );
self notify( "Lunar_Arrived" );
}
LunarDest2Spawn(){
self thread PlayerCheck( 0, level.PlayerOrig0 );
self thread PlayerCheck( 1, level.PlayerOrig1 );
self thread PlayerCheck( 2, level.PlayerOrig2 );
self thread PlayerCheck( 3, level.PlayerOrig3 );
self thread LunarEffect();
self thread LunarNuke();
self thread LunarFx( ( 300, -1640, 58 ) );
self thread LunarPowerUp( ( -163.83, -836.333, 719 ) );
level.Lunar1 moveto( ( 300, -1640, 699 ), 3, .5 );
level.Lunar1 vibrate( ( 0, -100, 0 ), 1.5, .4, 3 );
level.Lunar1 waittill( "movedone" );
wait .2;
level.Lunar1 moveto( ( 52, -440, 699 ), 6 );
level.Lunar1 waittill( "movedone" );
wait .2;
self thread KillAll( ( 52, -440, 1.8 ) );
level.Lunar1 moveto( ( 52, -440, -1.2 ), 3, 0, .5 );
level.Lunar1 vibrate( ( 0, -100, 0 ), 1.5, .4, 3 );
level.Lunar1 waittill( "movedone" );
self PlayerUnlink( 0 );
self PlayerUnlink( 1 );
self PlayerUnlink( 2 );
self PlayerUnlink( 3 );
self notify( "Lunar_Arrived" );
}
LunarEffect(){
self endon( "Lunar_Arrived" );
for(;
;
){
Earthquake( .14, .2, level.Lunar1.origin, 500 );
wait .2;
}
}
LunarPowerUp( origin ){
level.zombie_powerup_index = RandomInt( 4 );
level.zombie_vars["zombie_drop_item"] = 1;
level.powerup_drop_count = 0;
level thread maps\_zombiemode_powerups::powerup_drop( origin );
}
PlayerCheck( num, origin ){
P = get_players();
if( Distance( P[num].origin, level.Lunar1.origin ) <
100 ){
P[num] PlayerLinkTo( origin );
P[num] EnableHealthShield( true );
P[num] EnableInvulnerability();
P[num].OnLunar = true;
}
}
PlayerUnlink( num ){
P = get_players();
if( Distance( P[num].origin, level.Lunar1.origin ) <
100 ){
P[num] unlink();
P[num] EnableHealthShield( false );
P[num] DisableInvulnerability();
P[num].OnLunar = false;
}
}
LunarNuke(){
Zombz = GetAiSpeciesArray( "axis" );
Zombz = get_array_of_closest( level.Lunar1.origin, Zombz, undefined, undefined, 300 );
for( i = 0;
i <
Zombz.size;
i++ ){
wait( RandomFloatRange( .2, .3 ) );
Zombz[i] maps\_zombiemode_spawner::zombie_head_gib();
Zombz[i] DoDamage( 10000, Zombz[i].origin );
PlaySoundatPosition( "nuked", Zombz[i].origin );
}
}
KillAll( origin ){
wait 2;
self thread LunarNuke();
for( i = 0;
i <
get_players().size;
i++ ){
self thread PlayerSquash( origin, i );
}
}
PlayerSquash( ent, num ){
self endon( "Lunar_Arrived" );
P = get_players();
for(;
;
){
XAx = RandomIntRange( -110, 110 );
YAx = RandomIntRange( -110, 110 );
if( distance( P[num].origin, ent ) <
100 && P[num].OnLunar == false ){
P[num] DisableInvulnerability();
P[num] DoDamage( P[num].health + 999999, P[num].origin, undefined, undefined, "riflebullet" );
P[num] DoDamage( P[num].health + 999999, P[num].origin, undefined, undefined, "riflebullet" );
P[num] DoDamage( P[num].health + 999999, P[num].origin, undefined, undefined, "riflebullet" );
P[num] setOrigin( ent + ( XAx, YAx, 3 ) );
}
wait .01;
}
}
LunarFx( orig ){
level._effect["mainframe_steam"] = loadfx( "maps/zombie/fx_zombie_mainframe_steam" );
a = "mainframe_steam";
playfx( level._effect[a], orig + ( 50, -50, 0 ) );
wait .05;
playfx( level._effect[a], orig + ( -50, -50, 0 ) );
wait .05;
playfx( level._effect[a], orig + ( 50, 50, 0 ) );
wait .05;
playfx( level._effect[a], orig + ( -50, 50, 0 ) );
wait .05;
playfx( level._effect[a], orig + ( 0, -50, 0 ) );
wait .05;
playfx( level._effect[a], orig + ( 0, 50, 0 ) );
wait .05;
playfx( level._effect[a], orig + ( -50, 0, 0 ) );
wait .05;
playfx( level._effect[a], orig + ( 50, 0, 0 ) );
wait .05;
playfx( level._effect[a], orig + ( -50, 25, 0 ) );
wait .05;
playfx( level._effect[a], orig + ( -50, -25, 0 ) );
wait .05;
playfx( level._effect[a], orig + ( 50, 25, 0 ) );
wait .05;
playfx( level._effect[a], orig + ( 50, -25, 0 ) );
wait .05;
playfx( level._effect[a], orig + ( -25, -50, 0 ) );
wait .05;
playfx( level._effect[a], orig + ( -25, 50, 0 ) );
wait .05;
playfx( level._effect[a], orig + ( 25, -50, 0 ) );
wait .05;
playfx( level._effect[a], orig + ( 25, 50, 0 ) );
wait .05;
}
LunarFxCircle(){
self thread LunarFxCircle2( ( 52, -440, 10 ) );
self thread LunarFxCircle2( ( 300, -1640, 70 ) );
}
LunarFxCircle2( origin ){
LunarFxC = spawn( "script_model", origin );
LunarFxC2 = spawn( "script_model", LunarFxC.origin + ( 0, -56, 0 ) );
LunarFxC2 SetModel( "tag_origin" );
LunarFxC2.angles = ( 270, 0, 0 );
LunarFxC2 LinkTo( LunarFxC );
LunarFxC thread Rotate_Model( 360, 3 );
LunarFxC3 = spawn( "script_model", origin );
LunarFxC4 = spawn( "script_model", LunarFxC3.origin + ( 0, 56, 0 ) );
LunarFxC4 SetModel( "tag_origin" );
LunarFxC4.angles = ( 270, 0, 0 );
LunarFxC4 LinkTo( LunarFxC3 );
LunarFxC3 thread Rotate_Model( -360, 3 );
for( i = 0;
i <
3;
i++ ){
PlayFxOnTag( level._effect["mp_light_lamp"], LunarFxC2, "tag_origin" );
PlayFxOnTag( level._effect["mp_light_lamp"], LunarFxC4, "tag_origin" );
}
}
edited on Mar. 6, 2012 12:46 pm by aden34 |
|
|
|
Sevenz |
|
General Member Since: Apr 24, 2006 Posts: 2390 Last: May 10, 2013 [view latest posts] |
|
|
Category: CoDWW Zombie/Co-Op Mapping Posted: Wednesday, Mar. 7, 2012 01:21 pm |
|
ok, try this:
Code:
doLunarLander()
{
if( IsSubStr( level.script, "nazi_zombie_factory" ) && self GetFortStatus() == "SpotAvail" )
{
for( i = 0; i < get_players().size; i++ )
get_players()[i].OnLunar = false;
level.LunarsSpwnd = true;
level.lunar_activation_time = 3 * 20; // 3 seconds
self iPrintln( "Lunar Landers ^2Spawned" );
self thread LunaRModels();
self thread LunaR();
self thread LunaR2();
self thread LunarFxCircle();
}
}
LunaRModels()
{
level.LunarInUse = false;
level.LunarPosition = "Spawn";
SpawnPos = ( 52, -440, -1.2 );
level._effect["zombie_flashback_american"] = loadfx( "maps/zombie/fx_zombie_flashback_american" );
playfx( level._effect["zombie_flashback_american"], SpawnPos );
playfx( level._effect["zombie_flashback_american"], SpawnPos );
playfx( level._effect["zombie_flashback_american"], ( 300, -1640, 58 ) );
playfx( level._effect["zombie_flashback_american"], ( 300, -1640, 58 ) );
level.Lunar1 = spawn( "script_model", SpawnPos );
level.Lunar1 setmodel( "zombie_teleporter_pad" );
level.Lunar2 = spawn( "script_model", level.Lunar1.origin );
level.Lunar2 setModel( level.Lunar1.model );
level.Lunar2.angles = ( -180, 0, 0 );
level.Lunar2 linkto( level.Lunar1 );
level.PlayerOrig0 = spawn( "script_model", level.Lunar1.origin + ( 0, 50, 20 ) );
level.PlayerOrig0 linkto( level.Lunar1 );
level.PlayerOrig1 = spawn( "script_model", level.Lunar1.origin + ( 0, -50, 20 ) );
level.PlayerOrig1 linkto( level.Lunar1 );
level.PlayerOrig2 = spawn( "script_model", level.Lunar1.origin + ( 50, 0, 20 ) );
level.PlayerOrig2 linkto( level.Lunar1 );
level.PlayerOrig3 = spawn( "script_model", level.Lunar1.origin + ( -50, 0, 20 ) );
level.PlayerOrig3 linkto( level.Lunar1 );
level.CtrlPan = spawn( "script_model", level.Lunar1.origin + ( 0, -8, 40 ) );
level.CtrlPan setmodel( "zombie_teleporter_control_panel" );
level.CtrlPan linkto( level.Lunar1 );
level.CtrlPan2 = spawn( "script_model", level.Lunar1.origin + ( 0, 8, 40 ) );
level.CtrlPan2 setmodel( level.CtrlPan.model );
level.CtrlPan2.angles = ( 0, 180, 0 );
level.CtrlPan2 linkto( level.Lunar1 );
for( i = 0; i < get_players().size; i++ )
get_players()[i].OnLunar = false;
}
LunaR()
{
level.LunaTrig = Spawn( "trigger_radius", level.Lunar1.origin, 1, 50, 20 );
level.LunaTrig SetCursorHint( "HINT_NOICON" );
level.LunaTrig SetHintString( "Press & Hold &&1 To Use Lunar Lander" );
for(;;)
{
level.LunaTrig waittill( "trigger", i );
if( i lunar_holduse(level.lunar_activation_time, "Spawn"))
{
level.LunarInUse = true;
playsoundatposition( "pa_buzz", ( 52, -440, -1.2 ) );
level.LunaTrig SetHintString( "Lunar Lander In Use" );
level.LunaTrig2 SetHintString( "Lunar Lander In Use" );
i LunarSpawn2Dest();
level.LunarPosition = "Destination";
level.LunarInUse = false;
level.LunaTrig SetHintString( "Press & Hold &&1 To Call Lunar Lander" );
level.LunaTrig2 SetHintString( "Press & Hold &&1 To Use Lunar Lander" );
}
if ( i lunar_holduse(level.lunar_activation_time, "Destination") )
{
level.LunarInUse = true;
playsoundatposition( "pa_buzz", ( 52, -440, -1.2 ) );
level.LunaTrig SetHintString( "Lunar Lander In Use" );
level.LunaTrig2 SetHintString( "Lunar Lander In Use" );
i LunarDest2Spawn();
level.LunarPosition = "Spawn";
level.LunarInUse = false;
level.LunaTrig SetHintString( "Press & Hold &&1 To Use Lunar Lander" );
level.LunaTrig2 SetHintString( "Press & Hold &&1 To Call Lunar Lander" );
}
}
}
lunar_holduse(activation_time, lunar_pos)
{
for(t = 0; t < activation_time; t++)
{
if( !(self useButtonPressed() && isAlive(self) && self.sessionstate=="playing" && level.LunarPosition == lunar_pos && self.is_zombie == false && level.LunarInUse == false) )
break;
wait 0.05;
}
if ( t < activation_time )
return false;
return true;
}
LunaR2()
{
DestPos = ( 300, -1640, 58 );
level.LunaTrig2 = Spawn( "trigger_radius", DestPos, 1, 50, 20 );
level.LunaTrig2 SetCursorHint( "HINT_NOICON" );
level.LunaTrig2 SetHintString( "Press & Hold &&1 To Call Lunar Lander" );
for(;;)
{
level.LunaTrig2 waittill( "trigger", i );
if( i lunar_holduse(level.lunar_activation_time, "Spawn" )
{
level.LunarInUse = true;
playsoundatposition( "pa_buzz", DestPos );
level.LunaTrig SetHintString( "Lunar Lander In Use" );
level.LunaTrig2 SetHintString( "Lunar Lander In Use" );
i LunarSpawn2Dest();
level.LunarPosition = "Destination";
level.LunarInUse = false;
level.LunaTrig SetHintString( "Press & Hold &&1 To Call Lunar Lander" );
level.LunaTrig2 SetHintString( "Press & Hold &&1 To Use Lunar Lander" );
}
if( i lunar_holduse(level.lunar_activation_time, "Destination")
{
level.LunarInUse = true;
playsoundatposition( "pa_buzz", DestPos );
level.LunaTrig SetHintString( "Lunar Lander In Use" );
level.LunaTrig2 SetHintString( "Lunar Lander In Use" );
i LunarDest2Spawn();
level.LunarPosition = "Spawn";
level.LunarInUse = false;
level.LunaTrig SetHintString( "Press & Hold &&1 To Use Lunar Lander" );
level.LunaTrig2 SetHintString( "Press & Hold &&1 To Call Lunar Lander" );
}
}
}
LunarSpawn2Dest()
{
self thread PlayerCheck( 0, level.PlayerOrig0 );
self thread PlayerCheck( 1, level.PlayerOrig1 );
self thread PlayerCheck( 2, level.PlayerOrig2 );
self thread PlayerCheck( 3, level.PlayerOrig3 );
self thread LunarEffect();
self thread LunarNuke();
self thread LunarFx( ( 52, -440, -1.2 ) );
self thread LunarPowerUp( ( -163.83, -836.333, 719 ) );
level.Lunar1 moveto( ( 85, -450, 699 ), 3, .5 );
level.Lunar1 vibrate( ( 0, -100, 0 ), 1.5, .4, 3 );
level.Lunar1 waittill( "movedone" );
wait .2;
level.Lunar1 moveto( ( 300, -1640, 699 ), 6 );
level.Lunar1 waittill( "movedone" );
wait .2;
self thread KillAll( ( 300, -1640, 58 ) );
level.Lunar1 moveto( ( 300, -1640, 58 ), 3, 0, .5 );
level.Lunar1 vibrate( ( 0, -100, 0 ), 1.5, .4, 3 );
level.Lunar1 waittill( "movedone" );
self PlayerUnlink( 0 );
self PlayerUnlink( 1 );
self PlayerUnlink( 2 );
self PlayerUnlink( 3 );
self notify( "Lunar_Arrived" );
}
LunarDest2Spawn()
{
self thread PlayerCheck( 0, level.PlayerOrig0 );
self thread PlayerCheck( 1, level.PlayerOrig1 );
self thread PlayerCheck( 2, level.PlayerOrig2 );
self thread PlayerCheck( 3, level.PlayerOrig3 );
self thread LunarEffect();
self thread LunarNuke();
self thread LunarFx( ( 300, -1640, 58 ) );
self thread LunarPowerUp( ( -163.83, -836.333, 719 ) );
level.Lunar1 moveto( ( 300, -1640, 699 ), 3, .5 );
level.Lunar1 vibrate( ( 0, -100, 0 ), 1.5, .4, 3 );
level.Lunar1 waittill( "movedone" );
wait .2;
level.Lunar1 moveto( ( 52, -440, 699 ), 6 );
level.Lunar1 waittill( "movedone" );
wait .2;
self thread KillAll( ( 52, -440, 1.8 ) );
level.Lunar1 moveto( ( 52, -440, -1.2 ), 3, 0, .5 );
level.Lunar1 vibrate( ( 0, -100, 0 ), 1.5, .4, 3 );
level.Lunar1 waittill( "movedone" );
self PlayerUnlink( 0 );
self PlayerUnlink( 1 );
self PlayerUnlink( 2 );
self PlayerUnlink( 3 );
self notify( "Lunar_Arrived" );
}
LunarEffect()
{
self endon( "Lunar_Arrived" );
for(;;)
{
Earthquake( .14, .2, level.Lunar1.origin, 500 );
wait .2;
}
}
LunarPowerUp( origin )
{
level.zombie_powerup_index = RandomInt( 4 );
level.zombie_vars["zombie_drop_item"] = 1;
level.powerup_drop_count = 0;
level thread maps\_zombiemode_powerups::powerup_drop( origin );
}
PlayerCheck( num, origin )
{
P = get_players();
if( Distance( P[num].origin, level.Lunar1.origin ) < 100 )
{
P[num] PlayerLinkTo( origin );
P[num] EnableHealthShield( true );
P[num] EnableInvulnerability();
P[num].OnLunar = true;
}
}
PlayerUnlink( num )
{
P = get_players();
if( Distance( P[num].origin, level.Lunar1.origin ) < 100 )
{
P[num] unlink();
P[num] EnableHealthShield( false );
P[num] DisableInvulnerability();
P[num].OnLunar = false;
}
}
LunarNuke()
{
Zombz = GetAiSpeciesArray( "axis" );
Zombz = get_array_of_closest( level.Lunar1.origin, Zombz, undefined, undefined, 300 );
for( i = 0; i < Zombz.size; i++ )
{
wait( RandomFloatRange( .2, .3 ) );
Zombz[i] maps\_zombiemode_spawner::zombie_head_gib();
Zombz[i] DoDamage( 10000, Zombz[i].origin );
PlaySoundatPosition( "nuked", Zombz[i].origin );
}
}
KillAll( origin )
{
wait 2;
self thread LunarNuke();
for( i = 0; i < get_players().size; i++ )
self thread PlayerSquash( origin, i );
}
PlayerSquash( ent, num )
{
self endon( "Lunar_Arrived" );
P = get_players();
for(;;
{
XAx = RandomIntRange( -110, 110 );
YAx = RandomIntRange( -110, 110 );
if( distance( P[num].origin, ent ) < 100 && P[num].OnLunar == false )
{
P[num] DisableInvulnerability();
P[num] DoDamage( P[num].health + 999999, P[num].origin, undefined, undefined, "riflebullet" );
P[num] DoDamage( P[num].health + 999999, P[num].origin, undefined, undefined, "riflebullet" );
P[num] DoDamage( P[num].health + 999999, P[num].origin, undefined, undefined, "riflebullet" );
P[num] setOrigin( ent + ( XAx, YAx, 3 ) );
}
wait .01;
}
}
LunarFx( orig )
{
level._effect["mainframe_steam"] = loadfx( "maps/zombie/fx_zombie_mainframe_steam" );
a = "mainframe_steam";
playfx( level._effect[a], orig + ( 50, -50, 0 ) );
wait .05;
playfx( level._effect[a], orig + ( -50, -50, 0 ) );
wait .05;
playfx( level._effect[a], orig + ( 50, 50, 0 ) );
wait .05;
playfx( level._effect[a], orig + ( -50, 50, 0 ) );
wait .05;
playfx( level._effect[a], orig + ( 0, -50, 0 ) );
wait .05;
playfx( level._effect[a], orig + ( 0, 50, 0 ) );
wait .05;
playfx( level._effect[a], orig + ( -50, 0, 0 ) );
wait .05;
playfx( level._effect[a], orig + ( 50, 0, 0 ) );
wait .05;
playfx( level._effect[a], orig + ( -50, 25, 0 ) );
wait .05;
playfx( level._effect[a], orig + ( -50, -25, 0 ) );
wait .05;
playfx( level._effect[a], orig + ( 50, 25, 0 ) );
wait .05;
playfx( level._effect[a], orig + ( 50, -25, 0 ) );
wait .05;
playfx( level._effect[a], orig + ( -25, -50, 0 ) );
wait .05;
playfx( level._effect[a], orig + ( -25, 50, 0 ) );
wait .05;
playfx( level._effect[a], orig + ( 25, -50, 0 ) );
wait .05;
playfx( level._effect[a], orig + ( 25, 50, 0 ) );
wait .05;
}
LunarFxCircle()
{
self thread LunarFxCircle2( ( 52, -440, 10 ) );
self thread LunarFxCircle2( ( 300, -1640, 70 ) );
}
LunarFxCircle2( origin )
{
LunarFxC = spawn( "script_model", origin );
LunarFxC2 = spawn( "script_model", LunarFxC.origin + ( 0, -56, 0 ) );
LunarFxC2 SetModel( "tag_origin" );
LunarFxC2.angles = ( 270, 0, 0 );
LunarFxC2 LinkTo( LunarFxC );
LunarFxC thread Rotate_Model( 360, 3 );
LunarFxC3 = spawn( "script_model", origin );
LunarFxC4 = spawn( "script_model", LunarFxC3.origin + ( 0, 56, 0 ) );
LunarFxC4 SetModel( "tag_origin" );
LunarFxC4.angles = ( 270, 0, 0 );
LunarFxC4 LinkTo( LunarFxC3 );
LunarFxC3 thread Rotate_Model( -360, 3 );
for( i = 0; i < 3; i++ )
{
PlayFxOnTag( level._effect["mp_light_lamp"], LunarFxC2, "tag_origin" );
PlayFxOnTag( level._effect["mp_light_lamp"], LunarFxC4, "tag_origin" );
}
}
you can adjust the required hold time here:
level.lunar_activation_time = 3 * 20; // 3 seconds |
|
|
|
|
|
Sevenz |
|
General Member Since: Apr 24, 2006 Posts: 2390 Last: May 10, 2013 [view latest posts] |
|
|
Category: CoDWW Zombie/Co-Op Mapping Posted: Wednesday, Mar. 7, 2012 04:03 pm |
|
get the whole file and you can. how did you get what you posted?
i added a global var:
Code: level.lunar_activation_time = 3 * 20; // 3 seconds
replaced this:
Code: if( i UseButtonPressed() && level.LunarPosition == "Spawn" && i.is_zombie == false && level.LunarInUse == false ){
by this:
Code: if( i lunar_holduse(level.lunar_activation_time, "Spawn"))
and this:
Code: if( i UseButtonPressed() && level.LunarPosition == "Destination" && i.is_zombie == false && level.LunarInUse == false ){
by:
Code: if( i lunar_holduse(level.lunar_activation_time, "Destination"))
and added this new function:
Code: lunar_holduse(activation_time, lunar_pos)
{
for(t = 0; t < activation_time; t++)
{
if( !(self useButtonPressed() && isAlive(self) && self.sessionstate=="playing" && level.LunarPosition == lunar_pos && self.is_zombie == false && level.LunarInUse == false) )
break;
wait 0.05;
}
if ( t < activation_time )
return false;
return true;
}
|
|
|
|
|
Category: CoDWW Zombie/Co-Op Mapping Posted: Wednesday, Mar. 7, 2012 05:01 pm |
|
I used prettyprinter.de to make it look read able but it doesnt fully undo the obfuscation
this s the lunar lander script as is in the gsc
}doLunarLander(){if( IsSubStr( level.script, "nazi_zombie_factory" ) && self GetFortStatus() == "SpotAvail" ){for( i = 0;i < get_players().size;i++ ){get_players().OnLunar = false;}level.LunarsSpwnd = true;self iPrintln( "Lunar Landers ^2Spawned" );self thread LunaRModels();self thread LunaR();self thread LunaR2();self thread LunarFxCircle();}}LunaRModels(){level.LunarInUse = false;level.LunarPosition = "Spawn";SpawnPos = ( 52, -440, -1.2 );level._effect["zombie_flashback_american"] = loadfx( "maps/zombie/fx_zombie_flashback_american" );playfx( level._effect["zombie_flashback_american"], SpawnPos );playfx( level._effect["zombie_flashback_american"], SpawnPos );playfx( level._effect["zombie_flashback_american"], ( 300, -1640, 58 ) );playfx( level._effect["zombie_flashback_american"], ( 300, -1640, 58 ) );level.Lunar1 = spawn( "script_model", SpawnPos );level.Lunar1 setmodel( "zombie_teleporter_pad" );level.Lunar2 = spawn( "script_model", level.Lunar1.origin );level.Lunar2 setModel( level.Lunar1.model );level.Lunar2.angles = ( -180, 0, 0 );level.Lunar2 linkto( level.Lunar1 );level.PlayerOrig0 = spawn( "script_model", level.Lunar1.origin + ( 0, 50, 20 ) );level.PlayerOrig0 linkto( level.Lunar1 );level.PlayerOrig1 = spawn( "script_model", level.Lunar1.origin + ( 0, -50, 20 ) );level.PlayerOrig1 linkto( level.Lunar1 );level.PlayerOrig2 = spawn( "script_model", level.Lunar1.origin + ( 50, 0, 20 ) );level.PlayerOrig2 linkto( level.Lunar1 );level.PlayerOrig3 = spawn( "script_model", level.Lunar1.origin + ( -50, 0, 20 ) );level.PlayerOrig3 linkto( level.Lunar1 );level.CtrlPan = spawn( "script_model", level.Lunar1.origin + ( 0, -8, 40 ) );level.CtrlPan setmodel( "zombie_teleporter_control_panel" );level.CtrlPan linkto( level.Lunar1 );level.CtrlPan2 = spawn( "script_model", level.Lunar1.origin + ( 0, 8, 40 ) );level.CtrlPan2 setmodel( level.CtrlPan.model );level.CtrlPan2.angles = ( 0, 180, 0 );level.CtrlPan2 linkto( level.Lunar1 );for( i = 0;i < get_players().size;i++ ){get_players().OnLunar = false;}}LunaR(){level.LunaTrig = Spawn( "trigger_radius", level.Lunar1.origin, 1, 50, 20 );level.LunaTrig SetCursorHint( "HINT_NOICON" );level.LunaTrig SetHintString( "Press & Hold &&1 To Use Lunar Lander" );for(;;){level.LunaTrig waittill( "trigger", i );if( i UseButtonPressed() && level.LunarPosition == "Spawn" && i.is_zombie == false && level.LunarInUse == false ){level.LunarInUse = true;playsoundatposition( "pa_buzz", ( 52, -440, -1.2 ) );level.LunaTrig SetHintString( "Lunar Lander In Use" );level.LunaTrig2 SetHintString( "Lunar Lander In Use" );i LunarSpawn2Dest();level.LunarPosition = "Destination";level.LunarInUse = false;level.LunaTrig SetHintString( "Press & Hold &&1 To Call Lunar Lander" );level.LunaTrig2 SetHintString( "Press & Hold &&1 To Use Lunar Lander" );}if( i UseButtonPressed() && level.LunarPosition == "Destination" && i.is_zombie == false && level.LunarInUse == false ){level.LunarInUse = true;playsoundatposition( "pa_buzz", ( 52, -440, -1.2 ) );level.LunaTrig SetHintString( "Lunar Lander In Use" );level.LunaTrig2 SetHintString( "Lunar Lander In Use" );i LunarDest2Spawn();level.LunarPosition = "Spawn";level.LunarInUse = false;level.LunaTrig SetHintString( "Press & Hold &&1 To Use Lunar Lander" );level.LunaTrig2 SetHintString( "Press & Hold &&1 To Call Lunar Lander" );}}}LunaR2(){DestPos = ( 300, -1640, 58 );level.LunaTrig2 = Spawn( "trigger_radius", DestPos, 1, 50, 20 );level.LunaTrig2 SetCursorHint( "HINT_NOICON" );level.LunaTrig2 SetHintString( "Press & Hold &&1 To Call Lunar Lander" );for(;;){level.LunaTrig2 waittill( "trigger", i );if( i UseButtonPressed() && level.LunarPosition == "Spawn" && i.is_zombie == false && level.LunarInUse == false ){level.LunarInUse = true;playsoundatposition( "pa_buzz", DestPos );level.LunaTrig SetHintString( "Lunar Lander In Use" );level.LunaTrig2 SetHintString( "Lunar Lander In Use" );i LunarSpawn2Dest();level.LunarPosition = "Destination";level.LunarInUse = false;level.LunaTrig SetHintString( "Press & Hold &&1 To Call Lunar Lander" );level.LunaTrig2 SetHintString( "Press & Hold &&1 To Use Lunar Lander" );}if( i UseButtonPressed() && level.LunarPosition == "Destination" && i.is_zombie == false && level.LunarInUse == false ){level.LunarInUse = true;playsoundatposition( "pa_buzz", DestPos );level.LunaTrig SetHintString( "Lunar Lander In Use" );level.LunaTrig2 SetHintString( "Lunar Lander In Use" );i LunarDest2Spawn();level.LunarPosition = "Spawn";level.LunarInUse = false;level.LunaTrig SetHintString( "Press & Hold &&1 To Use Lunar Lander" );level.LunaTrig2 SetHintString( "Press & Hold &&1 To Call Lunar Lander" );}}}LunarSpawn2Dest(){self thread PlayerCheck( 0, level.PlayerOrig0 );self thread PlayerCheck( 1, level.PlayerOrig1 );self thread PlayerCheck( 2, level.PlayerOrig2 );self thread PlayerCheck( 3, level.PlayerOrig3 );self thread LunarEffect();self thread LunarNuke();self thread LunarFx( ( 52, -440, -1.2 ) );self thread LunarPowerUp( ( -163.83, -836.333, 719 ) );level.Lunar1 moveto( ( 85, -450, 699 ), 3, .5 );level.Lunar1 vibrate( ( 0, -100, 0 ), 1.5, .4, 3 );level.Lunar1 waittill( "movedone" );wait .2;level.Lunar1 moveto( ( 300, -1640, 699 ), 6 );level.Lunar1 waittill( "movedone" );wait .2;self thread KillAll( ( 300, -1640, 58 ) );level.Lunar1 moveto( ( 300, -1640, 58 ), 3, 0, .5 );level.Lunar1 vibrate( ( 0, -100, 0 ), 1.5, .4, 3 );level.Lunar1 waittill( "movedone" );self PlayerUnlink( 0 );self PlayerUnlink( 1 );self PlayerUnlink( 2 );self PlayerUnlink( 3 );self notify( "Lunar_Arrived" );}LunarDest2Spawn(){self thread PlayerCheck( 0, level.PlayerOrig0 );self thread PlayerCheck( 1, level.PlayerOrig1 );self thread PlayerCheck( 2, level.PlayerOrig2 );self thread PlayerCheck( 3, level.PlayerOrig3 );self thread LunarEffect();self thread LunarNuke();self thread LunarFx( ( 300, -1640, 58 ) );self thread LunarPowerUp( ( -163.83, -836.333, 719 ) );level.Lunar1 moveto( ( 300, -1640, 699 ), 3, .5 );level.Lunar1 vibrate( ( 0, -100, 0 ), 1.5, .4, 3 );level.Lunar1 waittill( "movedone" );wait .2;level.Lunar1 moveto( ( 52, -440, 699 ), 6 );level.Lunar1 waittill( "movedone" );wait .2;self thread KillAll( ( 52, -440, 1.8 ) );level.Lunar1 moveto( ( 52, -440, -1.2 ), 3, 0, .5 );level.Lunar1 vibrate( ( 0, -100, 0 ), 1.5, .4, 3 );level.Lunar1 waittill( "movedone" );self PlayerUnlink( 0 );self PlayerUnlink( 1 );self PlayerUnlink( 2 );self PlayerUnlink( 3 );self notify( "Lunar_Arrived" );}LunarEffect(){self endon( "Lunar_Arrived" );for(;;){Earthquake( .14, .2, level.Lunar1.origin, 500 );wait .2;}}LunarPowerUp( origin ){level.zombie_powerup_index = RandomInt( 4 );level.zombie_vars["zombie_drop_item"] = 1;level.powerup_drop_count = 0;level thread maps\_zombiemode_powerups::powerup_drop( origin );}PlayerCheck( num, origin ){P = get_players();if( Distance( P[num].origin, level.Lunar1.origin ) < 100 ){P[num] PlayerLinkTo( origin );P[num] EnableHealthShield( true );P[num] EnableInvulnerability();P[num].OnLunar = true;}}PlayerUnlink( num ){P = get_players();if( Distance( P[num].origin, level.Lunar1.origin ) < 100 ){P[num] unlink();P[num] EnableHealthShield( false );P[num] DisableInvulnerability();P[num].OnLunar = false;}}LunarNuke(){Zombz = GetAiSpeciesArray( "axis" );Zombz = get_array_of_closest( level.Lunar1.origin, Zombz, undefined, undefined, 300 );for( i = 0;i < Zombz.size;i++ ){wait( RandomFloatRange( .2, .3 ) );Zombz maps\_zombiemode_spawner::zombie_head_gib();Zombz DoDamage( 10000, Zombz.origin );PlaySoundatPosition( "nuked", Zombz.origin );}}KillAll( origin ){wait 2;self thread LunarNuke();for( i = 0;i < get_players().size;i++ ){self thread PlayerSquash( origin, i );}}PlayerSquash( ent, num ){self endon( "Lunar_Arrived" );P = get_players();for(;;){XAx = RandomIntRange( -110, 110 );YAx = RandomIntRange( -110, 110 );if( distance( P[num].origin, ent ) < 100 && P[num].OnLunar == false ){P[num] EnableInvulnerability();P[num] DoDamage( P[num].health + 999999, P[num].origin, undefined, undefined, "riflebullet" );P[num] DoDamage( P[num].health + 999999, P[num].origin, undefined, undefined, "riflebullet" );P[num] DoDamage( P[num].health + 999999, P[num].origin, undefined, undefined, "riflebullet" );P[num] setOrigin( ent + ( XAx, YAx, 3 ) );}wait .01;}}LunarFx( orig ){level._effect["mainframe_steam"] = loadfx( "maps/zombie/fx_zombie_mainframe_steam" );a = "mainframe_steam";playfx( level._effect[a], orig + ( 50, -50, 0 ) );wait .05;playfx( level._effect[a], orig + ( -50, -50, 0 ) );wait .05;playfx( level._effect[a], orig + ( 50, 50, 0 ) );wait .05;playfx( level._effect[a], orig + ( -50, 50, 0 ) );wait .05;playfx( level._effect[a], orig + ( 0, -50, 0 ) );wait .05;playfx( level._effect[a], orig + ( 0, 50, 0 ) );wait .05;playfx( level._effect[a], orig + ( -50, 0, 0 ) );wait .05;playfx( level._effect[a], orig + ( 50, 0, 0 ) );wait .05;playfx( level._effect[a], orig + ( -50, 25, 0 ) );wait .05;playfx( level._effect[a], orig + ( -50, -25, 0 ) );wait .05;playfx( level._effect[a], orig + ( 50, 25, 0 ) );wait .05;playfx( level._effect[a], orig + ( 50, -25, 0 ) );wait .05;playfx( level._effect[a], orig + ( -25, -50, 0 ) );wait .05;playfx( level._effect[a], orig + ( -25, 50, 0 ) );wait .05;playfx( level._effect[a], orig + ( 25, -50, 0 ) );wait .05;playfx( level._effect[a], orig + ( 25, 50, 0 ) );wait .05;}LunarFxCircle(){self thread LunarFxCircle2( ( 52, -440, 10 ) );self thread LunarFxCircle2( ( 300, -1640, 70 ) );}LunarFxCircle2( origin ){LunarFxC = spawn( "script_model", origin );LunarFxC2 = spawn( "script_model", LunarFxC.origin + ( 0, -56, 0 ) );LunarFxC2 SetModel( "tag_origin" );LunarFxC2.angles = ( 270, 0, 0 );LunarFxC2 LinkTo( LunarFxC );LunarFxC thread Rotate_Model( 360, 3 );LunarFxC3 = spawn( "script_model", origin );LunarFxC4 = spawn( "script_model", LunarFxC3.origin + ( 0, 56, 0 ) );LunarFxC4 SetModel( "tag_origin" );LunarFxC4.angles = ( 270, 0, 0 );LunarFxC4 LinkTo( LunarFxC3 );LunarFxC3 thread Rotate_Model( -360, 3 );for( i = 0;i < 3;i++ ){PlayFxOnTag( level._effect["mp_light_lamp"], LunarFxC2, "tag_origin" );PlayFxOnTag( level._effect["mp_light_lamp"], LunarFxC4, "tag_origin" );}} |
|
|
|
Sevenz |
|
General Member Since: Apr 24, 2006 Posts: 2390 Last: May 10, 2013 [view latest posts] |
|
|
|
|
Category: CoDWW Zombie/Co-Op Mapping Posted: Wednesday, Mar. 7, 2012 06:19 pm |
|
Sevenz writes...Quote: but how did you get it? Copied from hex editor text view? Using Fast file decompiler?
It's definately not the entire file, as what you posted starts with a }
used FF viewer any yeah i cant post the entire file because its too long
heres a text document with the full .gsc
http://www.mediafire.com/?kkubey6pa4952ue
its from motion flex v2.1
i just want to get rid of most of the bugs from elite's strat lobby
edited on Mar. 7, 2012 11:19 am by aden34 |
|
|
|
Sevenz |
|
General Member Since: Apr 24, 2006 Posts: 2390 Last: May 10, 2013 [view latest posts] |
|
|
|