UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - alaurenc9

Yeah guys "xSanchez78" is my second name, on steam and on ps3. Sorry i didnt make that very clear.
9 years ago
Hello guys.
Today I have made an awesome script.
It is where you use a trigger, survive rounds, and then a door opens.
Here is how to use it.

Here is the script:
Code Snippet
Plaintext
//================================================================================================
// Script Name  : Door That Opens After Rounds Are Survived
// Author : xSanchez78
// Notes : call "maps\_survive_rounds::main();" before "maps\_zombiemode::main();" in "mapname.gsc".
//================================================================================================
#include maps\_utility;
#include common_scripts\utility;
#include maps\_zombiemode_utility;
#using_animtree( "generic_human" );

main()
{
level.running_a_round = false;
door_trigger = GetEntArray("rounds_survive_doors", "targetname");
array_thread( door_trigger, ::init_flags );
array_thread( door_trigger, ::door_think );
}

init_flags()
{
if( isdefined( self.script_flag ) && !IsDefined( level.flag[self.script_flag] ) )
{
flag_init( self.script_flag );
}
}

door_think()
{
door_array = "";
if( isDefined( self.target ) )
{
door_array = self.target;
}
flag_to_set = "";
if( isdefined( self.script_flag ) )
{
flag_to_set = self.script_flag;
}
rounds_to_survive = 0;
if( isDefined( self.script_noteworthy ) )
{
rounds_to_survive = self.script_noteworthy;
}
cost = 0;
if( isDefined( self.zombie_cost ) )
{
cost = self.zombie_cost;
}
hint = "Press &&1 to Activate 'Survive " + rounds_to_survive + " Rounds' Mode";
if( cost != 0 )
{
hint = "Press &&1 to Activate 'Survive " + rounds_to_survive + " Rounds' Mode [Cost: " + cost + "]";
}
targets = GetEntArray( door_array, "targetname" );
for( i = 0; i < targets.size; i++ )
{
targets[i] disconnectpaths();
if( IsDefined( targets[i].script_noteworthy ) && targets[i].script_noteworthy == "clip" )
{
self.clip = targets[i];
self.script_string = "clip";
}
else if( !IsDefined( targets[i].script_string ) )
{
if( IsDefined( targets[i].script_angles ) )
{
targets[i].script_string = "rotate";
}
else if( IsDefined( targets[i].script_vector ) )
{
targets[i].script_string = "move";
}
}
else
{
if ( targets[i].script_string == "anim" )
{
AssertEx( IsDefined( targets[i].script_animname ), "Blocker_init: You must specify a script_animname for "+targets[i].targetname );
AssertEx( IsDefined( level.scr_anim[ targets[i].script_animname ] ), "Blocker_init: You must define a level.scr_anim for script_anim -> "+targets[i].script_animname );
AssertEx( IsDefined( level.blocker_anim_func ), "Blocker_init: You must define a level.blocker_anim_func" );
}
}
}
self.doors = targets;
self setHintString( hint );
self SetCursorHint( "HINT_NOICON" );
self UseTriggerRequireLookAt();
while(1)
{
self waittill("trigger", player);
if(level.running_a_round)
{
iprintlnbold ( "You're In The Middle Of Surviving A Set Of Rounds" );
continue;
}
if( player in_revive_trigger() )
{
continue;
}
if( !is_player_valid( player ) )
{
continue;
}
if( cost != 0 )
{
if(player.score < cost)
{
player playsound("deny");
continue;
}
player playsound("cha_ching");
player maps\_zombiemode_score::minus_to_player_score( cost );
}
self setHintString( "" );
break;
}
level.running_a_round = true;
if( rounds_to_survive != 0 )
{
iprintlnbold ( "Survive " + rounds_to_survive + " Rounds To Open The Doors" );
texthud = newHudElem();
texthud.foreground = true;
        texthud.sort = 1;
        texthud.hidewheninmenu = false;
texthud.alignX = "center";
texthud.alignY = "top";
texthud.horzAlign = "center";
texthud.vertAlign = "top";
texthud.x = 0;
texthud.y =  18;
texthud.fontscale = 1.5;
texthud.color = ( 1.0, 1.0, 1.0 );
texthud.alpha = 1;
for( rounds_survived = 0; rounds_survived < rounds_to_survive; rounds_survived++ )
{
texthud setText("Rounds to Survive: " + (rounds_to_survive - rounds_survived));
wait_a_round();
}
texthud Destroy();
iprintlnbold (rounds_to_survive + " Rounds Survived, Doors Have Been Opened");
}
level.running_a_round = false;
for( i = 0; i < self.doors.size; i++ )
{
self.doors[i] NotSolid();
self.doors[i] connectpaths();
if( IsDefined( self.doors[i].door_moving ) )
{
continue;
}
self.doors[i].door_moving = 1;
if( ( IsDefined( self.doors[i].script_noteworthy ) && self.doors[i].script_noteworthy == "clip" ) || ( IsDefined( self.doors[i].script_string ) && self.doors[i].script_string == "clip" ) )
{
continue;
}
if( IsDefined( self.doors[i].script_sound ) )
{
play_sound_at_pos( self.doors[i].script_sound, self.doors[i].origin );
}
else
{
play_sound_at_pos( "door_slide_open", self.doors[i].origin );
}
time = 2;
if( IsDefined( self.doors[i].script_transition_time ) )
{
time = self.doors[i].script_transition_time;
}
switch( self.doors[i].script_string )
{
case "rotate":
if(isDefined(self.doors[i].script_angles))
{
self.doors[i] RotateTo( self.doors[i].script_angles, time, 0, 0 );
self.doors[i] thread door_solid_thread();
}
wait(randomfloat(.15));
break;

case "move":
case "slide_apart":
if(isDefined(self.doors[i].script_vector))
{
self.doors[i] MoveTo( self.doors[i].origin + self.doors[i].script_vector, time, time * 0.25, time * 0.25 );
self.doors[i] thread door_solid_thread();
}
wait(randomfloat(.15));
break;

case "anim":
self.doors[i] [[ level.blocker_anim_func ]]( self.doors[i].script_animname );
self.doors[i] thread door_solid_thread_anim();
wait(randomfloat(.15));
break;
}
if( isDefined( self.doors[i].target ) )
{
self.doors[i] maps\_zombiemode_blockers_new::add_new_zombie_spawners();
}
}
if( flag_to_set != "" )
{
flag_set( flag_to_set );
}
all_trigs = getentarray( door_array, "target" );
for( i = 0; i < all_trigs.size; i++ )
{
all_trigs[i] delete();
}
}

wait_a_round()
{
next_round = level.round_number + 1;
while(1)
{
if(next_round == level.round_number)
{
break;
}
wait 1;
}
}

door_solid_thread()
{
self waittill_either( "rotatedone", "movedone" );
while( 1 )
{
players = get_players();
player_touching = false;
for( i = 0; i < players.size; i++ )
{
if( players[i] IsTouching( self ) )
{
player_touching = true;
break;
}
}
if( !player_touching )
{
self Solid();
return;
}
wait( 1 );
}
}

door_solid_thread_anim()
{
self waittillmatch( "door_anim", "end" );
while( 1 )
{
players = get_players();
player_touching = false;
for( i = 0; i < players.size; i++ )
{
if( players[i] IsTouching( self ) )
{
player_touching = true;
break;
}
}
if( !player_touching )
{
self Solid();
return;
}
wait( 1 );
}
}


Go into "mapname.gsc" and underneath "maps\_zombiemode::main();" add "maps\_survive_rounds::main();".
Make a new ".gsc" file and place the script above into it.
Call it "_survive_rounds.gsc".
Place the script into "Root/mods/mapname/maps".
Then go into Radiant and open your map.
Everything will be set up using KVP's, like a real zombie_door.
It may get a bit complex, but I'll try to do my best to explain.
First make a trigger_use.
Give it this initial KVP.
          targetname = rounds_survive_doors

First add "script_noteworthy".
Now all you need to add in this KVP is the number of rounds you need to survive for this trigger.
Now if you want cost, add this as another KVP: "zombie_cost".
Set any value for a cost, and the hintstring will adjust.
If you dont want cost, DONT add this KVP at ALL.
That way the hintstring will not have any cost listed on it and will not play the "cha-ching" sound on use.
Next if you want a flag to set after the door is open like to activate a zone, add "script_flag" as a KVP.
Then type the name of the flag you want to be set.
Finally add the KVP "target".
Then type a Key you will remember to array to the doors that will open.
Once you use one trigger in game, all other triggers will disable so you cannot activate multiple "survive round" modes at once.
They all re-enable once there is no "survive rounds" mode active.
Now to set up the doors.
Each trigger can open as many doors at once as you want.
Each door you want to be opened will be targeted by the trigger.
That means the door's initial KVP will be this:
          targetname = (TRIGGER'S_TARGET_KVP)

I hope that makes sense, because I can't think of a better way to say that.
Now to set up how the door will open once told to open.
If you want the door to just delete without doing anything, just leave it alone after adding the targetname.
If you want the door to look more professional and move on open, do the following.
Add a new KVP called "script_vector".
Now type in this "0 0 0".
This is just like setting up a normal door's script_vector.
The first "0" will be the door's X-Axis Move.
You can type negative or positive numbers to make the door move forward or backward.
The middle "0" will be the doors Y-Axis Move.
You can type negative or positive numbers to make the door move left or right.
The last "0" will be the door's Z-Axis Move.
You can type negative or positive numbers to make the door move up or down.
After setting your values make sure there is only one space between each number and no spaces before or after.
I hope that made sense to you, I dont know a better way to explain it.
Now add a new KVP called "script_transition_time".
Set it to how long you want it to take for your door to open.
If you dont set this KVP, the time will default to 2 seconds for sound sync.
Now add a new KVP called "script_noteworthy".
Here you will either set it to "solid" or "delete".
If you set it to "solid", after the door is done moving, it will just remain solid where it is on your map.
If you set it to "delete", after the door is done moving, it will delete of your map.

That's all.
Remember if you dont set a "script_vector" for your door, it will just delete on open.
You can make as many trigger's and doors for the trigger's to open as you want.
I hope this tutorial made sense since there is so much to explain.
Remember in Mod Builder, Select the following before you Build Mod:
          maps/_survive_rounds.gsc
          maps/mapname.gsc

Remember to credit me if you use this.
Thanks and peace out.
By the way for those wondering, my real preferred name is xSanchez78.
9 years ago
Hello Guys
My name is xSanchez78.
Today I have created a Second Pack-a-Punch Machine.
It uses the same script as the pack-a-punch machine found in "_zombiemode_perks.gsc"
But is heavily modded by me and placed into a standalone ".gsc" file.

Go into "Root/raw/maps" and copy any ".gsc" file.
Paste it onto your desktop.
Rename it to "_weapon_bundle.gsc".
Here is the script to place into it:
Code Snippet
Plaintext
//================================================================================================
// Script Name  : Weapon Bundle Upgrade Machine
// Author : xSanchez78
// Notes : call "maps\_weapon_bundle::main();" after "maps\_zombiemode::main();" in "mapname.gsc".
//
//================================================================================================
#include common_scripts\utility;
#include maps\_utility;
#include maps\_zombiemode_utility;
#include maps\_zombiemode_zone_manager;
#include maps\_music;
#include maps\dlc3_code;
#include maps\dlc3_teleporter;

main()
{
vending_bundle_trigger = GetEntArray("zombie_vending_bundle", "targetname");
if ( vending_bundle_trigger.size >= 1 )
{
array_thread( vending_bundle_trigger, ::vending_bundle );
}
level.bundle_timeout = 15;
level thread turn_Bundle_on();
}

turn_Bundle_on()
{
flag_wait("electricity_on");
vending_bundle_trigger = GetEntArray("zombie_vending_bundle", "targetname");
for(i=0; i<vending_bundle_trigger.size; i++ )
{
perk = getent(vending_bundle_trigger[i].target, "targetname");
if(isDefined(perk))
{
perk thread activate_bundle();
}
}
}

activate_bundle()
{
self setmodel("zombie_vending_packapunch_on");
self playsound("perks_power_on");
self vibrate((0,-100,0), 0.3, 0.4, 3);
timer = 0;
duration = 0.05;
level notify( "Bundle_On" );
}

vending_bundle()
{
perk_machine = GetEnt( self.target, "targetname" );
if( isDefined( perk_machine.target ) )
{
perk_machine.wait_flag = GetEnt( perk_machine.target, "targetname" );
}
self UseTriggerRequireLookAt();
self SetHintString( "The power must be activated first" );
self SetCursorHint( "HINT_NOICON" );
level waittill("Bundle_On");
self thread maps\_zombiemode_weapons::decide_hide_show_hint();
bundle_rollers = spawn("script_origin", self.origin);
bundle_timer = spawn("script_origin", self.origin);
bundle_rollers playloopsound("packa_rollers_loop");
self SetHintString( "Press & hold &&1 to Bundle Weapon [Cost: 5000]" );
for( ;; )
{
self waittill( "trigger", player );
index = maps\_zombiemode_weapons::get_player_index(player);
cost = 5000;
plr = "plr_" + index + "_";
if( !player maps\_zombiemode_weapons::can_buy_weapon() )
{
wait( 0.1 );
continue;
}
if (player maps\_laststand::player_is_in_laststand() )
{
wait( 0.1 );
continue;
}
if( player isThrowingGrenade() )
{
wait( 0.1 );
continue;
}
if( player isSwitchingWeapons() )
{
wait(0.1);
continue;
}
current_weapon = player getCurrentWeapon();
if( !IsDefined( level.zombie_include_weapons[current_weapon] ) || !IsDefined( level.zombie_include_weapons[current_weapon + "_bundled"] ) )
{
iprintlnbold ("This Weapon Is Not Bundle-Able");
continue;
}
if ( player.score < cost )
{
self playsound("deny");
player thread maps\_zombiemode_perks::play_no_money_perk_dialog();
continue;
}
player maps\_zombiemode_score::minus_to_player_score( cost );
self achievement_notify("perk_used");
sound = "bottle_dispense3d";
playsoundatposition(sound, self.origin);
rand = randomintrange(1,100);
if( rand <= 8 )
{
player thread maps\_zombiemode_perks::play_packa_wait_dialog(plr);
}
origin = self.origin;
angles = self.angles;
if( isDefined(perk_machine))
{
origin = perk_machine.origin+(0,0,35);
angles = perk_machine.angles+(0,90,0);
}
self disable_trigger();
player thread do_knuckle_crack();
self.current_weapon = current_weapon;
weaponmodel = player third_person_weapon_bundle( current_weapon, origin, angles, bundle_rollers, perk_machine );
self enable_trigger();
self SetHintString( "Press & hold &&1 to Take Bundled Weapon" );
self setvisibletoplayer( player );
self thread wait_for_player_to_take( player, current_weapon, bundle_timer );
self thread wait_for_timeout( bundle_timer );
self waittill_either( "bundle_timeout", "bundle_taken" );
self.current_weapon = "";
weaponmodel delete();
self SetHintString( "Press & hold &&1 to Bundle Weapon [Cost: 5000]" );
self setvisibletoall();
}
}

do_knuckle_crack()
{
gun = self bundle_knuckle_crack_begin();
self.is_drinking = 1;
self waittill_any( "fake_death", "death", "player_downed", "weapon_change_complete" );
self bundle_knuckle_crack_end( gun );
self.is_drinking = undefined;
}

bundle_knuckle_crack_begin()
{
self DisableOffhandWeapons();
self DisableWeaponCycling();
self AllowLean( false );
self AllowAds( false );
self AllowSprint( false );
self AllowProne( false );
self AllowMelee( false );
if ( self GetStance() == "prone" )
{
self SetStance( "crouch" );
}
primaries = self GetWeaponsListPrimaries();
gun = self GetCurrentWeapon();
weapon = "zombie_knuckle_crack";
if ( gun != "none" && gun != "mine_bouncing_betty" )
{
self TakeWeapon( gun );
}
else
{
return;
}
if( primaries.size <= 1 )
{
self GiveWeapon( "zombie_colt" );
}
self GiveWeapon( weapon );
self SwitchToWeapon( weapon );
return gun;
}

bundle_knuckle_crack_end( gun )
{
assert( gun != "zombie_perk_bottle_doubletap" );
assert( gun != "zombie_perk_bottle_revive" );
assert( gun != "zombie_perk_bottle_jugg" );
assert( gun != "zombie_perk_bottle_sleight" );
assert( gun != "syrette" );
self EnableOffhandWeapons();
self EnableWeaponCycling();
self AllowLean( true );
self AllowAds( true );
self AllowSprint( true );
self AllowProne( true );
self AllowMelee( true );
weapon = "zombie_knuckle_crack";
if ( self maps\_laststand::player_is_in_laststand() )
{
self TakeWeapon(weapon);
return;
}
self TakeWeapon(weapon);
primaries = self GetWeaponsListPrimaries();
if( isDefined( primaries ) && primaries.size > 0 )
{
self SwitchToWeapon( primaries[0] );
}
else
{
self SwitchToWeapon( "zombie_colt" );
}
}

third_person_weapon_bundle( current_weapon, origin, angles, bundle_rollers, perk_machine )
{
forward = anglesToForward( angles );
interact_pos = origin + (forward*-25);
worldgun = spawn( "script_model", interact_pos );
worldgun.angles  = self.angles;
worldgun setModel( GetWeaponModel( current_weapon ) );
PlayFx( level._effect["packapunch_fx"], origin+(0,1,-34), forward );
worldgun rotateto( angles+(0,90,0), 0.35, 0, 0 );
wait( 0.5 );
worldgun moveto( origin, 0.5, 0, 0 );
bundle_rollers playsound( "packa_weap_upgrade" );
if( isDefined( perk_machine.wait_flag ) )
{
perk_machine.wait_flag rotateto( perk_machine.wait_flag.angles+(179, 0, 0), 0.25, 0, 0 );
}
wait( 0.35 );
worldgun delete();
wait( 6 );
bundle_rollers playsound( "packa_weap_ready" );
worldgun = spawn( "script_model", origin );
worldgun.angles  = angles+(0,90,0);
worldgun setModel( GetWeaponModel( current_weapon+"_bundled" ) );
worldgun moveto( interact_pos, 0.5, 0, 0 );
if( isDefined( perk_machine.wait_flag ) )
{
perk_machine.wait_flag rotateto( perk_machine.wait_flag.angles-(179, 0, 0), 0.25, 0, 0 );
}
wait( 0.5 );
worldgun moveto( origin, level.bundle_timeout, 0, 0);
return worldgun;
}

wait_for_player_to_take( player, weapon, bundle_timer )
{
index = maps\_zombiemode_weapons::get_player_index(player);
plr = "plr_" + index + "_";
self endon( "bundle_timeout" );
while( true )
{
bundle_timer playloopsound( "ticktock_loop" );
self waittill( "trigger", trigger_player );
bundle_timer stoploopsound(.05);
if( trigger_player == player )
{
if( !player maps\_laststand::player_is_in_laststand() )
{
self notify( "bundle_taken" );
primaries = player GetWeaponsListPrimaries();
if( isDefined( primaries ) && primaries.size >= 2 )
{
player maps\_zombiemode_weapons::weapon_give( weapon+"_bundled" );
}
else
{
player GiveWeapon( weapon+"_bundled" );
player GiveMaxAmmo( weapon+"_bundled" );
}
player SwitchToWeapon( weapon+"_bundled" );
player achievement_notify( "DLC3_ZOMBIE_PAP_ONCE" );
player achievement_notify( "DLC3_ZOMBIE_TWO_UPGRADED" );
player thread maps\_zombiemode_perks::play_packa_get_dialog(plr);
return;
}
}
wait( 0.05 );
}
}

wait_for_timeout( bundle_timer )
{
self endon( "bundle_taken" );
wait( level.bundle_timeout );
self notify( "bundle_timeout" );
bundle_timer stoploopsound(.05);
bundle_timer playsound( "packa_deny" );
}



Place this ".gsc" file into "Root/mods/mapname/maps".
Add "maps\_weapon_bundle::main();" before "maps\_zombiemode::main();" in "mapname.gsc".

Now here is how to make a new weapon to be bundled after it has been upgraded.
Make your new weapon file.
Rename it to "WEAPONNAME_upgraded_bundled".
I will not show you how to change the weapon's on-screen name, ammo, camo, or damage amount.
This can be found in other tutorials, but for this I will just show you how to set your gun up.

Go into Launcher.
Go into the "Mob Builder" Tab.
Add this into the "mod.csv".
Code Snippet
Plaintext
weapon,sp\WEAPONNAME_upgraded_bundled

Go into "_zombiemode_weapons.gsc".
Find the "init_weapons()" function.
Add this to it:
Code Snippet
Plaintext
add_zombie_weapon( "WEAPONNAME_upgraded_bundled", "Press & hold &&1 to buy WEAPONNAME [Cost: 10000]", 10000, "" );
Go into "dlc3_code.gsc"
Find the "include_weapons()" function.
Add this to it:
Code Snippet
Plaintext
include_weapon( "WEAPONNAME_upgraded_bundled", false );

As I said at the top, this will be set up like pack-a-punch.
So If you have a custom xmodel, make sure it has the slot for the weapon to go in and out of.
This tutorial I plan on editing over a period of time.
So when I get the availability in my schedule, I will make an xmodel and provide a link for it.
But unfortunately right now, I dont have one, Im sorry Ill work on it.

Open Radiant.
Make a trigger_use like this:
   targetname = zombie_vending_bundle
   target = (PICK_A_NAME_TO_TARGET_THE_MACHINE)

Make you custom machine xmodel.
Again make sure it has the slot for the weapon to go in and out of, like pack-a-punch.
Make the machine's KVP's look like this:
   targetname = (TRIGGER_USE_TARGET)
   target = (PICK_A_NAME_TO_TARGET_THE_FLAG)

If you want the wait flag that pops up behind pap while your paping, add the xmodel of a custom one of yours.
Make it's KVP's like this:
   targetname = (MACHINE_TARGET)

Like I said, this is a project I am going to work on for a long time.
If you like this tutorial, expect an update one day.
I will hope to have come up with a custom xmodel, along with some new fx and sounds.

Open Launcher.
Compile Your Map.
Go to Mob Builder.
Make sure to select the following in the IWD List:

maps/mapname.gsc
maps/_weapon_bundle.gsc
maps/_zombiemode_weapons.gsc
maps/dlc3_code.gsc
weapons/sp/WEAPONNAME_upgraded_bundled

Again as it says above, make sure to check all your new weapon files in the "weapons/sp" folder.
Again I will be back with some updates to this tutorial, such as a custom model, fx, and sounds.
It will all be included in a download link, and updated to this tut once I'm done w/ them.
Credit me, xSanchez78, for this.
Enjoy & Peace.
9 years ago
So to beat this map, do you build power with 2 parts. Then build navcard table with 5 parts. Then shoot the 3 monkeys which opens secret room/box-in-the-wall and you pick the navcard there. Then you place the navcard on the table and it waits 21 seconds or something like that and you get 10,000 points, 7000 point blundergat buy, and enables end game trigger for 80,000. The end game is the teleporter in the green room that originally had the spool thingy part and all the panels on the walls right?

Is all this true?
Would appreciate if someone clarifys.
Thanks and peace

By the way:

8) (Image removed from quote.)

nice job, i will try to do the same as soon as possible.
9 years ago
Hey Guys.
I just recently thought of something interesting.
I thought could you make multiple end game switches?
Yes you can.
I have made a script.

First you make a new ".gsc" file.
Rename it to "end_switches.gsc".
Place this into it:
Code Snippet
Plaintext
//================================================================================================
// Script Name  : Multiple End Game Switches
// Author : xSanchez78
// Notes : call "maps\end_switches::main();" after "maps\_zombiemode::main();" in "mapname.gsc".
//
//================================================================================================
#include common_scripts\utility;
#include maps\_utility;
#include maps\_zombiemode_utility;
#include maps\_hud_util;

main()
{
level.game_was_beaten = false;
level.end_switch_cost = 30000;
end_switches = GetEntArray("end_game_switch", "targetname");
level.NumberOfSwitches = end_switches.size;
level.NumberOfSwitchesActive = 0;
array_thread(end_switches,::end_switches_init);
}

end_switches_init()
{
self sethintstring("Press &&1 to Actviate The End Game Switch [Cost: "+level.end_switch_cost+"]");
self setCursorHint("HINT_NOICON");
while(1)
{
self waittill( "trigger", player );
if(player.score >= level.end_switch_cost)
{
self playsound("cha_ching");
player maps\_zombiemode_score::minus_to_player_score( level.end_switch_cost );
current = level.NumberOfSwitchesActive;
level.NumberOfSwitchesActive = current + 1;
EndSwitchCheck();
self delete();
}
else if(player.score < level.end_switch_cost)
{
self playsound("deny");
}
}
}

EndSwitchCheck()
{
if(level.NumberOfSwitchesActive == level.NumberOfSwitches)
{
iprintlnbold ("All Switches Activated, Game Has Been Beaten");
level.game_was_beaten = true;
level notify( "end_game" );
}
else
{
iprintlnbold ("Need To Activate More End Game Switches");
}
}



Call "maps\end_switches::main();" after "maps\_zombiemode::main();" in "mapname.gsc".
Go into "_zombiemode.gsc".
Search for the "end_game()" function.
Replace it with this:
Code Snippet
Plaintext
end_game()
{
level waittill ( "end_game" );
if( level.game_was_beaten == false )
{
thread game_over_state_died();
}
else if( level.game_was_beaten == true )
{
thread game_over_state_won();
}
}

game_over_state_died()
{
level.intermission = true;

update_leaderboards();

game_over = NewHudElem( self );
game_over.alignX = "center";
game_over.alignY = "middle";
game_over.horzAlign = "center";
game_over.vertAlign = "middle";
game_over.y -= 10;
game_over.foreground = true;
game_over.fontScale = 3;
game_over.alpha = 0;
game_over.color = ( 1.0, 1.0, 1.0 );
game_over SetText( &"ZOMBIE_GAME_OVER" );

game_over FadeOverTime( 1 );
game_over.alpha = 1;

survived = NewHudElem( self );
survived.alignX = "center";
survived.alignY = "middle";
survived.horzAlign = "center";
survived.vertAlign = "middle";
survived.y += 20;
survived.foreground = true;
survived.fontScale = 2;
survived.alpha = 0;
survived.color = ( 1.0, 1.0, 1.0 );

if( level.round_number < 2 )
{
survived SetText( &"ZOMBIE_SURVIVED_ROUND" );
}
else
{
survived SetText( &"ZOMBIE_SURVIVED_ROUNDS", level.round_number );
}
//TUEY had to change this since we are adding other musical elements
setmusicstate("end_of_game");
setbusstate("default");

survived FadeOverTime( 1 );
survived.alpha = 1;

wait( 1 );

//play_sound_at_pos( "end_of_game", ( 0, 0, 0 ) );
wait( 2 );
intermission();

wait( level.zombie_vars["zombie_intermission_time"] );

level notify( "stop_intermission" );
array_thread( get_players(), ::player_exit_level );

bbPrint( "zombie_epilogs: rounds %d", level.round_number );

wait( 1.5 );

if( is_coop() )
{
ExitLevel( false );
}
else
{
MissionFailed();
}



// Let's not exit the function
wait( 666 );
}

game_over_state_won()
{
level.intermission = true;

update_leaderboards();

game_over = NewHudElem( self );
game_over.alignX = "center";
game_over.alignY = "middle";
game_over.horzAlign = "center";
game_over.vertAlign = "middle";
game_over.y -= 10;
game_over.foreground = true;
game_over.fontScale = 3;
game_over.alpha = 0;
game_over.color = ( 1.0, 1.0, 1.0 );
game_over SetText( "YOU WON" );

game_over FadeOverTime( 1 );
game_over.alpha = 1;

survived = NewHudElem( self );
survived.alignX = "center";
survived.alignY = "middle";
survived.horzAlign = "center";
survived.vertAlign = "middle";
survived.y += 20;
survived.foreground = true;
survived.fontScale = 2;
survived.alpha = 0;
survived.color = ( 0.423, 0.004, 0 );

if( level.round_number < 2 )
{
survived SetText( "You Won After 1 Round" );
}
else
{
survived SetText( "You Won After ", level.round_number, " Rounds" );
}
//TUEY had to change this since we are adding other musical elements
setmusicstate("end_of_game");
setbusstate("default");

survived FadeOverTime( 1 );
survived.alpha = 1;

wait( 1 );

//play_sound_at_pos( "end_of_game", ( 0, 0, 0 ) );
wait( 2 );
intermission();

wait( level.zombie_vars["zombie_intermission_time"] );

level notify( "stop_intermission" );
array_thread( get_players(), ::player_exit_level );

bbPrint( "zombie_epilogs: rounds %d", level.round_number );

wait( 1.5 );

if( is_coop() )
{
ExitLevel( false );
}
else
{
MissionFailed();
}



// Let's not exit the function
wait( 666 );
}



Go into Radiant.
Make a trigger_use.
Give it this KVP:
          targetname = end_game_switch

You can place as many of these around your map.
They will all have the same hintstring, cost, and all will need to be activated to end the game.
You can edit the price and hintstring in the "end_switches.gsc".
Thats all.
Enjoy.
Credit me, xSanchez78 for this.
Peace.
9 years ago
I like this and am thinking about using this. Thanks for tut
9 years ago
@  Imirageraptor

sweet stuff man, i beat it solo! man that map was very stupidly secret. Im not hating on the map maker, i love the map with electric cherry, vulture aid, and bo1 perks by bamskater, and his custom double dew where he renamed to nuka cola and made points *5. But he made it even more secret to open parts then treyarch makes there easter eggs. Damn son that was annoying, but glad i did it. At least x5 points made 85000 easier to get, but i like a good points challenge, so that didnt bother me. Thanks again Imirageraptor, and the map maker.
9 years ago
Hello Guys.
Today I have created a small yet useful script.
This covers power and pap doors.
What is a power door?
A power door is a door that opens after the power is activated.
Isn't that already in the game like verruckt and der riese?
Yes it is but I'm pretty sure almost no one, not even I, knows how to use it.
Therefore I just created a script that is simpler and is seperated from all the other complex scripts in the game.
What is a pap door?
A pap door is a door that opens after all der riese style teleporters are linked.
This part of the script only applies to people using der riese style teleporting in their map.
Isn't that also already in world at war in the map der riese?
Yes it is, but I have some reasons that I think people will understand for making a new script.
1. The original pap door is basically the script_model for the pap door and an invisible clip infront of it so that nobody can walk through the model. In the original dlc3_teleporter script, the script model will move down a little on the first link, again on the second, and then all the way down on the third followed by the clip deleting. That is a bit complicated for those who want to just simply add a pap door.
2. The script_model used in der riese is a certain size. The treyarch map makers have made the dlc3_teleporter script make the model move down certain amounts of units. Therefore it will only look proper when you use the pap door script_model or another script_model/script_brushmodel that is the exact same size as the pap door model. Some may want a different model, that is a different size. But the movement for it will not look good unless you go in and re-count the units you want the door to move and then edit that in the dlc3_teleporter script. I know I dont want to do that, and Im sure others dont aswell. My script just waits for all teleporters to be linked, and then gives an easy way to make the door move where ever YOU want it to, no hassle required.
Those are my reasons for remaking the power/pap doors. Now lets get to installation.

Get a ".gsc" file.
Name it "power_pap_door.gsc".
Put the following in it:
Code Snippet
Plaintext
//================================================================================================
// Script Name : Door That Opens After Power is Activated, Door That Opens After All Three Teleporters Are Linked
// Author : xSanchez78
// Moving Door Help : Gamer9294
// Online Link : http://ugx-mods.com/forum/index.php?topic=4613.0
// Notes : call "maps\power_pap_door::main();" after "maps\_zombiemode::main();" in "mapname.gsc".
//================================================================================================
#include common_scripts\utility;
#include maps\_utility;
#include maps\_zombiemode_utility;

main()
{
//make sure to edit this --------------------------
self.power_dr_z = -150; //value = amount of units the door moves on the Z axis. Positive values move the door UP; negative values move the door DOWN.
self.power_dr_x = 0; //value = amount of units the door moves on the X axis. Positive values move the door RIGHT; negative values move the door LEFT.
self.power_dr_y = 0; //value = amount of units the door moves on the Y axis. Positive values move the door FORWARD; negative values move the door BACKWARD.
self.pap_dr_z = -150; //value = amount of units the door moves on the Z axis. Positive values move the door UP; negative values move the door DOWN.
self.pap_dr_x = 0; //value = amount of units the door moves on the X axis. Positive values move the door RIGHT; negative values move the door LEFT.
self.pap_dr_y = 0; //value = amount of units the door moves on the Y axis. Positive values move the door FORWARD; negative values move the door BACKWARD.

//don't edit this ---------------------------------
thread power_door();
thread pap_door();
}

power_door()
{
hintstring_trigger1 = getEnt("power_door1_hintstring", "targetname");
hintstring_trigger1 UseTriggerRequireLookat();
hintstring_trigger1 setCursorHint( "HINT_NOICON" );
hintstring_trigger1 sethintstring( "Power must be activated first" ); //hintstring text to notify player of what needs to occur for the door to open
flag_wait("electricity_on");
wait 1;
hintstring_trigger1 delete();
players = get_players();
for( i = 0; i < players.size; i++ )
{
players[i] playsound("door_slide_open");
}
power_door1 = getEnt("power_door1", "targetname");
power_door1 notsolid();
power_door1 moveZ( self.power_dr_z, 2);
power_door1 moveX( self.power_dr_x, 2);
power_door1 moveY( self.power_dr_y, 2);
wait 2.2;
power_door1 delete();
}

pap_door()
{
hintstring_trigger1 = getEnt("pap_door1_hintstring", "targetname");
hintstring_trigger1 UseTriggerRequireLookat();
hintstring_trigger1 setCursorHint( "HINT_NOICON" );
hintstring_trigger1 sethintstring( "All Three Teleporters Must Be Linked First" ); //hintstring text to notify player of what needs to occur for the door to open
flag_wait( "teleporter_pad_link_3" );
wait 1;
hintstring_trigger1 delete();
players = get_players();
for( i = 0; i < players.size; i++ )
{
players[i] playsound("door_slide_open");
}
pap_door1 = getEnt("pap_door1", "targetname");
pap_door1 notsolid();
pap_door1 moveZ( self.pap_dr_z, 2);
pap_door1 moveX( self.pap_dr_x, 2);
pap_door1 moveY( self.pap_dr_y, 2);
wait 2.2;
pap_door1 delete();
}



Add "maps\power_pap_door::main();" after "maps\_zombiemode::main();" in "mapname.gsc".
Adding a second/third/fourth/cont. door should be self explanitory after reading the script.
Make sure at the top to change how you want the door to move after it has been told to open.
Go into radiant.
Make either a script_model or script_brushmodel for your door(s).
Make the power door this:
targetname = power_door1

Make the pap door this:
targetname = pap_door1

Now put a trigger_use infront of each door.
These will not be for using, only for showing a hintstring that informs the players what action needs to occur for the door to open.
Example: "The power must be activated first"
Trying to use the trigger_use will have no effect, do not worry.
They will also be deleted along with the door, so no worries about extra unneeded entities on your map.
Make the trigger_use infront of the power door this:
targetname = power_door1_hintstring

Make the one in front of the pap door this:
targetname - pap_door1_hintstring

Save & Close.
Compile Map.
In mod builder, make sure to check the following:
power_pap_door.gsc
mapname.gsc

Build Mod.

Credit me, xSanchez78, for this tutorial.
By the way, some people thought alaurenc9 and xSanchez78 were two different people.
Well my zombiemodding name is alaurenc9, my steam, ps3, ps4, xbox, and any other thing's name is xSanchez78.
So dont think we are to different people, Lol.
Credits to Gamer9294 for helping with the moving door ideas.
And the setup for people to easily make the door move wherever they want it to.
Example video, NOT MADE BY ME!, it was made by Gamer9294.
www.youtube.com/watch?v=Ulnxi_UwRkM
Enjoy and peace.
9 years ago
Bro how do you beat this? I think i saw a utub video where the dude said you have to shoot this electric shock symbol wil a un-upgraded ballista but idk if there is more or what the fuck
10 years ago
Hey i was wondering, what does the fastfile do? also,  i am planning to use ugx mods v1.1 with my map so i wll use them for my bo1 perks, but i still want to use your vulture aid and electric cherry. Adding the fastfile that covers the bo1 pperks as well as vulture and cherry but not using the bo1 perks wont hurt anything will it?
10 years ago
I am looking for the end game script where you pay a certain price and then you have to survive 10 more rounds to beat the game. ive been searching through hell and back and just cant find it. if you know the script reply the linkhere or contact me through steam at: www.steamcommunity.com/id/xSanchez78

Thanks,
xSanchez78
10 years ago
Loading ...