Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!#using scripts\codescripts\struct;
#using scripts\shared\flag_shared;
#using scripts\shared\array_shared;
#using scripts\shared\util_shared;
#using scripts\shared\ai\zombie_utility;
#using scripts\zm\_zm_utility;
#using scripts\zm\_zm_score;
#using scripts\zm\_zm_unitrigger;
#using scripts\shared\math_shared;
#using scripts\zm\_zm_traps;
#using scripts\zm\_zm_weap_gravityspikes;
#using scripts\zm\_zm_spawner;
#using scripts\shared\hud_util_shared;
#using scripts\zm\_zm_powerups;
#using scripts\zm\crate_powerup_logic;
#using scripts\zm\vial_spawn;
#precache("fx", "custom/arch_robot_propulsion");
#precache("fx", "custom/arch_robot_laser");
//#precache("xanim", "arch_robot_anim_test");
//#precache("xanim", "arch_robot_dance");
//#precache("xanim", "arch_robot_hack_loop");
//#precache("xanim", "arch_robot_idle_passive");
//#precache("xanim", "arch_robot_idle");
#precache("xanim", "arch_robot_v7_idle");
#precache("xanim", "arch_robot_v7_combat_idle");
#precache("xanim", "arch_robot_v7_focus_atk");
#precache("xanim", "arch_robot_v7_laser_fire");
#precache("xanim", "arch_robot_v7_laser_aim_idle");
#precache("xmodel", "arch_robot_v7");
#precache("xmodel", "arch_robot_laser_gun");
#using_animtree("arch_drone_anims");
#namespace arch_drone_ai;
function init()
{
level flag::wait_till("all_players_connected");
level flag::init("inRadius", false);
level._effect["robot_propulsion"] = "custom/arch_robot_propulsion";
level._effect["robot_laser"] = "custom/arch_robot_laser";
trig = GetEnt("robot_test", "targetname");
trig SetCursorHint("HINT_NOICON");
trig SetHintString("Press &&1 to test anim");
trig thread follow();
}
function follow()
{
self waittill("trigger", player);
org = positionBot(player);
self.robot = Spawn("script_model", player.origin + org);
self.robot.angles = (0, -90, 0);
self.mover = Spawn("script_model", player.origin + org);
wait(0.2);
self.mover SetModel("tag_origin");
self.robot SetModel("arch_robot_v7");
self.robot EnableLinkTo();
self.robot LinkTo(self.mover, "tag_origin");
PlayFXOnTag(level._effect["robot_propulsion"], self.robot, "tag_origin");
self.robot.animState = "idle";
//self.robot SetScale(2.0);
self.robot UseAnimTree(#animtree);
wait(0.2);
tag = self.robot GetTagOrigin("tag_right_elbow");
self.robot.laser = Spawn("script_model", tag);
self.robot.laser SetModel("arch_robot_laser_gun");
self.robot.laser LinkTo(self.robot, "tag_right_elbow", (15, 0, 1.5), (0, -90, 0));
self.robot.laser Hide();
self.robot AnimScripted("anim_done", self.robot.origin, self.robot.angles, %arch_robot_v7_idle);
self thread robot_animState_watcher();
self thread robot_positioning_system(player);
while(1)
{
org = positionBot(player);
self.mover MoveTo(player.origin + org, .2);
wait(.2);
}
}
function positionBot(player)
{
//Forward and to the right of players view
f = AnglesToForward(player.angles) * 125;
org = AnglesToRight(player.angles) * 40 + (f + (0,0,75));
return org;
}
function robot_positioning_system(player)
{
while(1)
{
switch(self.robot.animState)
{
case "combat_idle":
case "focus_atk":
case "laser_atk":
//Decide robot's facing direction
zombies = GetAISpeciesArray("axis", "all");
closestZombie = ArrayGetClosest(self.mover.origin, zombies, 500);
//Target nearest enemy
tag = closestZombie GetTagOrigin("tag_eye");
vectorToFace = self.mover.origin - (tag[0], tag[1], tag[2] + 25);
//vectorToFace = self.mover.origin - (closestZombie.origin[0], closestZombie.origin[1], closestZombie.origin[2] + 120);
angle2Face = VectortoAngles(vectorToFace);
self.mover RotateTo((angle2Face[0], angle2Face[1] + 180, angle2Face[2]), .2);
break;
case "idle":
//If no zombies are in range, robot follows players direction
angles = player GetPlayerAngles();
self.mover RotateTo(angles, .2);
break;
}
wait(0.2);
}
}
function robot_animState_watcher()
{
while(1)
{
zombies = GetAISpeciesArray("axis", "all");
closest = ArrayGetClosest(self.robot.origin, zombies);
dist = Distance2D(self.robot.origin, closest.origin);
if(!isdefined(closest) || dist > 500 && self.robot.animState != "idle")
{
switch(self.robot.animState)
{
//void <entity> AnimScripted(<notify>,<origin>,<angles>,<animation>,[mode],[root],[rate],[blend],[lerp],[animation time],[is_scene_animation],[showPlayerWeaponInFirstPerson])
case "combat_idle":
self.robot AnimScripted("anim_done", self.robot.origin, self.robot.angles, %arch_robot_v7_idle, "normal", %arch_robot_v7_combat_idle, 1, 1, 1);
break;
case "focus_atk":
self.robot AnimScripted("anim_done", self.robot.origin, self.robot.angles, %arch_robot_v7_idle, "normal", %arch_robot_v7_laser_aim_idle, 1, .5, .5);
break;
case "laser_atk":
self.robot AnimScripted("anim_done", self.robot.origin, self.robot.angles, %arch_robot_v7_idle, "normal", %arch_robot_v7_laser_fire, 1, .5, .5);
break;
}
self.robot.animState = "idle";
}
if(isdefined(closest) && dist < 500 && dist > 200 && self.robot.animState != "combat_idle")
{
switch(self.robot.animState)
{
case "idle":
self.robot AnimScripted("anim_done", self.robot.origin, self.robot.angles, %arch_robot_v7_combat_idle, "normal", %arch_robot_v7_idle, 1, .5, .5);
break;
case "focus_atk":
self.robot AnimScripted("anim_done", self.robot.origin, self.robot.angles, %arch_robot_v7_combat_idle, "normal", %arch_robot_v7_laser_aim_idle, 1, .5, .5);
break;
case "laser_atk":
self.robot AnimScripted("anim_done", self.robot.origin, self.robot.angles, %arch_robot_v7_combat_idle, "normal", %arch_robot_v7_laser_fire, 1, .5, .5);
break;
}
self.robot.animState = "combat_idle";
}
if(isdefined(closest) && dist < 200 && dist > 50 && self.robot.animState != "focus_atk")
{
switch(self.robot.animState)
{
case "combat_idle":
self.robot AnimScripted("anim_done", self.robot.origin, self.robot.angles, %arch_robot_v7_laser_aim_idle, "normal", %arch_robot_v7_combat_idle, 1, .5, .5);
break;
case "idle":
self.robot AnimScripted("anim_done", self.robot.origin, self.robot.angles, %arch_robot_v7_laser_aim_idle, "normal", %arch_robot_v7_idle, 1, .5, .5);
break;
case "laser_atk":
self.robot AnimScripted("anim_done", self.robot.origin, self.robot.angles, %arch_robot_v7_laser_aim_idle, "normal", %arch_robot_v7_laser_fire, 1, .5, .5);
break;
}
self.robot.animState = "focus_atk";
self thread projectile_logic();
}
/*
if(isdefined(closest) && dist < 50 && self.robot.animState != "laser_atk")
{
switch(self.robot.animState)
{
case "combat_idle":
self.robot AnimScripted("anim_done", self.robot.origin, self.robot.angles, %arch_robot_v7_laser_fire, "normal", %arch_robot_v7_combat_idle, 2, .5, .5);
break;
case "idle":
self.robot AnimScripted("anim_done", self.robot.origin, self.robot.angles, %arch_robot_v7_laser_fire, "normal", %arch_robot_v7_idle, 2, .5, .5);
break;
case "focus_atk":
self.robot AnimScripted("anim_done", self.robot.origin, self.robot.angles, %arch_robot_v7_laser_fire, "normal", %arch_robot_v7_laser_aim_idle, 2, .5, .5);
break;
}
self.robot.animState = "laser_atk";
}
*/
wait(.5);
}
}
function projectile_logic()
{
self.robot.laser Show();
while(self.robot.animState == "focus_atk")
{
zombies = GetAIArray("axis", "all");
zombie = ArrayGetClosest(self.mover.origin, zombies);
//laserOrg = Spawn("script_model");
//laserOrg SetModel("tag_origin");
PlayFXOnTag(level._effect["robot_laser"], self.mover, "tag_origin");
self.robot AnimScripted("anim_done", self.robot.origin, self.robot.angles, %arch_robot_v7_laser_fire, "normal", %arch_robot_v7_laser_aim_idle, 2, .05, .05);
//self.robot AnimScripted("anim_done", self.robot.origin, self.robot.angles, %arch_robot_v7_laser_fire);
//PlayFXOnTag(level._effect["robot_laser"], self.mover, "tag_origin");
/*traceArray = BulletTrace(self.mover.origin, (zombie.origin[0], zombie.origin[1], zombie.origin[2] + 100), true, self.robot);
foreach(val in traceArray)
{
IPrintLnBold(val);
}
*/
self.robot waittill("anim_done");
wait(0.5);
self.robot AnimScripted("anim_done", self.robot.origin, self.robot.angles, %arch_robot_v7_laser_aim_idle, "normal", %arch_robot_v7_laser_fire, 1, .2, .2);
wait(1);
if(self.robot.animState != "focus_atk")
{
break;
}
}
self.robot.laser Hide();
}
function robot_combat_logic()
{
//void <entity> DoDamage(<health>,<source position>,[attacker],[inflictor],[hitloc],[mod],[dflags],[weapon],[infdestructible_piece_indexlictor],[forcePain])
}
void <entity> IsPlayerSliding()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns 1 if the player is currently sliding
EXAMPLE: if(ent IsPlayerSliding())
function give_custom_perk()
{
// quick revive in solo gives an extra life
// give perk here
if(isdefined(self.hasFreezePerk) && self.hasFreezePerk == true) //Here is the check I make to stop spam buying
break;
self SetPerk("specialty_freeze");
self.hasFreezePerk = true;
self.has_custom_perks++;
self thread freeze_perk_shader::add_custom_perk_shader( self, "e115_vial_empty_shader" ); // CHANGE THIS TO YOUR PERK SHADER
trigger = GetEnt("specialty_freeze", "target"); // CHANGE THIS TO YOUR PERK MACHINE NAME
trigger SetHintStringForPlayer(self, "");
trigger SetInvisibleToPlayer(self);
}
function main()
{
level thread custom_buildables_random::init();
#using scripts\zm\custom_buildables_random;
scriptparsetree,scripts/zm/custom_buildables_random.gsc
xmodel,p7_zm_der_pswitch_body
xmodel,p7_zm_der_pswitch_handle
xmodel,p7_zm_zod_fuse
material,power_panel_shader
material,power_handle_shader
material,power_fuse_shader
{
"Type" : "ALIAS",
"Name" : "arch_custom_build_sounds",
"Filename" : "arch_custom_build_sounds.csv",
"Specs" : [ ]
}
//Add that block of code above the curly and square brackets at the bottom - shown below
]
}
#using scripts\codescripts\struct;
#using scripts\shared\array_shared;
#using scripts\shared\callbacks_shared;
#using scripts\shared\clientfield_shared;
#using scripts\shared\demo_shared;
#using scripts\shared\flag_shared;
#using scripts\shared\hud_util_shared;
#using scripts\shared\laststand_shared;
#using scripts\shared\system_shared;
#using scripts\shared\util_shared;
#insert scripts\shared\shared.gsh;
#insert scripts\shared\version.gsh;
#using scripts\zm\_zm_bgb;
#using scripts\zm\_zm_equipment;
#using scripts\zm\_zm_stats;
#using scripts\zm\_zm_unitrigger;
#using scripts\zm\_zm_utility;
#using scripts\zm\_zm_weapons;
#insert scripts\zm\_zm_perks.gsh;
#insert scripts\zm\_zm_utility.gsh;
#insert scripts\zm\craftables\_zm_craftables.gsh;
#precache("model", "p7_zm_der_pswitch_body");
#precache("model", "p7_zm_der_pswitch_handle");
#precache("model", "p7_zm_zod_fuse");
#precache("weapon", "zombie_builder");
#precache( "material", "power_panel_shader");
#precache( "material", "power_handle_shader");
#precache( "material", "power_fuse_shader");
#namespace custom_buildables_random;
///////////////////////////////////////
// ITITIALIZE FLAGS //
///////////////////////////////////////
function init(){
level flag::wait_till("all_players_connected");
foreach(player in GetPlayers()){
player.shader_var = [];
}
//wait(3);
//FLAG COMMANDS:
//level flag::init("flagname", false); <-- false so flag is OFF by default, but registered for use in script
//level flag::set("flagname"); <-- turns on "flagname"
//level flag::clear("flagname"); <-- turns off "flagname"
//level flag::get("flagname"); <-- returns true or false if "flagname" is on or off
thread buildable_power();
//thread buildable_e115();
}
///////////////////////////////////////
// BUIDABLE POWER //
///////////////////////////////////////
function buildable_power(){
finalflag = "power_crafted";
level flag::init(finalflag, false);
level flag::init("handle_flag", false);
level flag::init("panel_flag", false);
level flag::init("fuse_flag", false);
power_trig = GetEnt("use_elec_switch", "targetname");
power_trig SetCursorHint("HINT_NOICON");
power_trig TriggerEnable(false);
//power_clip = GetEnt("power_clip", "targetname");
//power_clip Hide();
power_panel = GetEnt("main_panel", "targetname");
power_panel Hide();
power_lever = GetEnt("elec_switch", "script_noteworthy");
power_lever Hide();
power_bench = GetEnt("craft_bench", "targetname");
bench_fx_loc = GetEnt(power_bench.target, "targetname");
power_bench.built = false;
power_bench SetCursorHint("HINT_NOICON");
power_bench SetHintString("Missing parts");
fuses = GetEntArray("power_fuse", "script_noteworthy");
handles = GetEntArray("power_handle", "script_noteworthy");
panels = GetEntArray("power_panel", "script_noteworthy");
thread random_spawn(handles, "handle_flag", "p7_zm_der_pswitch_handle", "high-voltage lever");
thread random_spawn(panels, "panel_flag", "p7_zm_der_pswitch_body", "industrial housing");
thread random_spawn(fuses, "fuse_flag", "p7_zm_zod_fuse", "electrical fuse");
power_bench thread build_logic(bench_fx_loc, finalflag, "handle_flag", "panel_flag", "fuse_flag", "electrical panel");
//This function can be copied, and renamed to easily
//create new buildables. Just change the "craft_bench"
//targetname on the bench trigger to "craft_bench_trig_name" etc
//It threads all the stamped prefabs for specified parts
//and deletes all but one. The prefab comes with the model, but you
//first position the prefab wherever you want the part to spawn, then
//you stamp the prefab.
//Lastly -- Threads the random spawn function with the array's of
//each part's possible spawn locations, and the flags to activate when picked up
while(1){
if(level flag::get("power_crafted") == true){
//power_clip Show();
power_panel Show();
power_lever Show();
power_trig TriggerEnable(true);
break;
}else
wait(.1);
}
}
///////////////////////////////////////
// BUILD LOGIC //
///////////////////////////////////////
function build_logic(bench_fx_loc, final_flag, part1_flag, part2_flag, part3_flag, build_hint){
while(1){
if(level flag::get(part1_flag) && level flag::get(part2_flag) && level flag::get(part3_flag)){
self SetHintString("Hold &&1 to build "+build_hint);
self waittill("trigger", player);
self SetHintString("");
player PlaySound("build_loop");
PlayFX(level._effect["building_dust"], bench_fx_loc);
player thread crafting_hud(self, final_flag);
player thread custom_craft_anim();
player util::waittill_any("build_canceled", "build_complete");
player StopSound("build_loop");
player StopSounds();
wait(0.1);
if(self.built == true){
player PlaySound("build_done");
foreach(player in GetPlayers()){
player.shader_var1 Destroy();
player.shader_var2 Destroy();
player.shader_var3 Destroy();
}
self Delete();
break;
}
}else
wait(1);
}
}
///////////////////////////////////////
// RANDOM SPAWN //
///////////////////////////////////////
function random_spawn(parts, flag, model, hint){
r = RandomInt(parts.size);
foreach(part in parts){
part_model = GetEnt(part.target, "targetname");
if(part == parts[r]){
part thread part_pickup(flag, hint, part_model);
}else{
part_model Delete();
part Delete();
}
}
//Takes in the parts[] array, and flags, you send from your
//buildable function. The parts array is an array of triggers
//left behind from stamping a 'random spawn point' - prefab
//The function then chooses a random trigger to save, and deletes
//the rest of the unused triggers and the script_models they're targeting
//Part pick-up logic is threaded last, right before deleting all
//the spawn locations of the random parts that weren't chosen to spawn
}
///////////////////////////////////////
// PART PICKUP LOGIC //
///////////////////////////////////////
function part_pickup(flag, hint, part){
self SetCursorHint("HINT_NOICON");
self SetHintString("Press &&1 to pickup "+hint);
self waittill("trigger", player);
level flag::set(flag);
player PlaySound("part_pickup");
wait(0.1);
PlayFX(level._effect["powerup_grabbed"], self.origin);
foreach(player in GetPlayers()){
switch(self.script_int){
case 1:
if(player IsSplitScreen())
player thread part_shader_logic("power_fuse_shader", 1, 12, 30);
else
player thread part_shader_logic("power_fuse_shader", 1, 24, 60);
break;
case 2:
if(player IsSplitScreen())
player thread part_shader_logic("power_panel_shader", 2, 15, 30);
else
player thread part_shader_logic("power_panel_shader", 2, 31, 60);
break;
case 3:
if(player IsSplitScreen())
player thread part_shader_logic("power_handle_shader", 3, 18, 30);
else
player thread part_shader_logic("power_handle_shader", 3, 35, 60);
break;
}
part Delete();
self Delete();
}
}
///////////////////////////////////////
// PART SHADER LOGIC //
///////////////////////////////////////
function part_shader_logic(shader, position, size_x, size_y){
hud = position - 1;
self.shader_var[hud] = NewClientHudElem(self);
self.shader_var[hud].alignX = "right";
self.shader_var[hud].alignY = "top";
self.shader_var[hud].horzAlign = "user_right";
self.shader_var[hud].vertAlign = "user_top";
if(self IsSplitScreen())
self.shader_var[hud].y = ((size_y * position) + 10) - 25;
else
self.shader_var[hud].y = ((size_y * position) + 10);
self.shader_var[hud].x = -5;
self.shader_var[hud] setShader(shader, size_x, size_y);
self waittill("power_crafted");
foreach(shader in self.shader_var){
shader Destroy();
}
}
///////////////////////////////////////
// CUSTOM CRAFTING ANIMATION //
///////////////////////////////////////
function custom_craft_anim(){
self endon("disconnect");
self craft_anim_begin();
self util::waittill_any("fake_death", "death", "player_downed", "weapon_change_complete", "build_canceled", "build_complete");
self craft_anim_end();
}
///////////////////////////////////////
// CRAFTING ANIMATION BEGIN //
///////////////////////////////////////
function craft_anim_begin(){
self zm_utility::increment_is_drinking();
self zm_utility::disable_player_move_states(true);
primaries = self GetWeaponsListPrimaries();
original_weapon = self GetCurrentWeapon();
weapon = GetWeapon("zombie_builder");
self GiveWeapon(weapon);
self SwitchToWeapon(weapon);
}
///////////////////////////////////////
// CRAFTING ANIMATION END //
///////////////////////////////////////
function craft_anim_end(){
self zm_utility::enable_player_move_states();
weapon = GetWeapon("zombie_builder");
if(self laststand::player_is_in_laststand() || IS_TRUE(self.intermission)){
self TakeWeapon(weapon);
return;
}
self zm_utility::decrement_is_drinking();
self TakeWeapon(weapon);
primaries = self GetWeaponsListPrimaries();
if(IS_DRINKING(self.is_drinking)){
return;
}else{
self zm_weapons::switch_back_primary_weapon();
}
}
///////////////////////////////////////
// CUSTOM CRAFTING HUD //
///////////////////////////////////////
function crafting_hud(trig, flag){
self.useBar = self hud::createPrimaryProgressBar();
self.useBarText = self hud::createPrimaryProgressBarText();
self.useBarText SetText("Crafting...");
self thread crafting_hud_update(GetTime(), 3000, trig, flag);
}
///////////////////////////////////////
// CRAFTING HUD UPDATE FUNCTION //
///////////////////////////////////////
function crafting_hud_update(start_time, craft_time, trig, flag){
self endon("entering_last_stand");
self endon("death");
self endon("disconnect");
self endon("build_canceled");
while(1){
progress = (GetTime() - start_time) / craft_time;
dist = Distance(self.origin, trig.origin);
if(dist > 100 || !self UseButtonPressed() && progress < 1){
self.useBarText hud::destroyElem();
self.useBar hud::destroyElem();
self notify("build_canceled");
break;
}
if(progress < 0){
progress = 0;
}
if(progress > 1 || GetTime() - start_time > craft_time && self UseButtonPressed()){
level flag::set(flag);
foreach(player in GetPlayers()){
player notify(flag);
}
trig.built = true;
self notify("build_complete");
self.useBarText hud::destroyElem();
self.useBar hud::destroyElem();
return trig;
break;
}
if(!self UseButtonPressed() && progress < 1){
self.useBarText hud::destroyElem();
self.useBar hud::destroyElem();
self notify("build_canceled");
break;
}
self.useBar hud::UpdateBar(progress);
WAIT_SERVER_FRAME;
}
}
{
"Name" : "zm_compund",
"GameMode" : "mpl",
"IsCommon" : false,
"Parent" : "",
"Overlay" : "",
"IsStandalone" : true,
"IsProduction" : false,
"IsShipped" : false,
"DontDeploy" : false,
"NoStreamBank" : false,
"MapFile" : "",
"Standalone" : true,
"Builds" : [ "T7" ],
"Sources" : [
{
"Type" : "ALIAS",
"Name" : "user_aliases",
"Filename" : "user_aliases.csv",
"Specs" : [ ]
}
]
}
>class,zm_mod_level
>group,modtools
xmodel,skybox_default_day
material,luts_t7_default
// BSP
col_map,maps/zm/zm_compund.d3dbsp
gfx_map,maps/zm/zm_compund.d3dbsp
// Audio
sound,zm_compund
scriptparsetree,scripts/zm/zm_compund.gsc
scriptparsetree,scripts/zm/zm_compund.csc
scriptparsetree,scripts/zm/e115_collector.gsc
scriptparsetree,scripts/zm/e115_follower.gsc
scriptparsetree,scripts/zm/custom_buildables_random.gsc
xmodel,p7_zm_der_pswitch_body
xmodel,p7_zm_der_pswitch_handle
xmodel,p7_zm_zod_fuse
fx,custom/elec_orb
fx,custom/elec_orb_minion
fx,custom/elec_orb_impact
Name,Behavior,Storage,FileSpec,FileSpecSustain,FileSpecRelease,Template,Loadspec,Secondary,SustainAlias,ReleaseAlias,Bus,VolumeGroup,DuckGroup,Duck,ReverbSend,CenterSend,VolMin,VolMax,DistMin,DistMaxDry,DistMaxWet,DryMinCurve,DryMaxCurve,WetMinCurve,WetMaxCurve,LimitCount,LimitType,EntityLimitCount,EntityLimitType,PitchMin,PitchMax,PriorityMin,PriorityMax,PriorityThresholdMin,PriorityThresholdMax,AmplitudePriority,PanType,Pan,Futz,Looping,RandomizeType,Probability,StartDelay,EnvelopMin,EnvelopMax,EnvelopPercent,OcclusionLevel,IsBig,DistanceLpf,FluxType,FluxTime,Subtitle,Doppler,ContextType,ContextValue,ContextType1,ContextValue1,ContextType2,ContextValue2,ContextType3,ContextValue3,Timescale,IsMusic,IsCinematic,FadeIn,FadeOut,Pauseable,StopOnEntDeath,Compression,StopOnPlay,DopplerScale,FutzPatch,VoiceLimit,IgnoreMaxDist,NeverPlayTwice,ContinuousPan,FileSource,FileSourceSustain,FileSourceRelease,FileTarget,FileTargetSustain,FileTargetRelease,Platform,Language,OutputDevices,PlatformMask,WiiUMono,StopAlias,DistanceLpfMin,DistanceLpfMax,FacialAnimationName,RestartContextLoops,SilentInCPZ,ContextFailsafe,GPAD,GPADOnly,MuteVoice,MuteMusic,RowSourceFileName,RowSourceShortName,RowSourceLineNumber
zmb_craftable_pickup,,,wpn\craftable.wav,,,UIN_MOD,,,,,,grp_weapon,snp_wpn_1p_shot,,,,99,100,,,,,,,,,,,,,,,,,,,2d,,,NONLOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
zmb_craftable_buy_shield,,,wpn\craftable.wav,,,GRP_WPN,,,,,,grp_weapon,snp_wpn_1p_shot,,,,75,80,,,,,,,,,,,,,,,,,,,2d,,,NONLOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
zmb_craftable_complete,,,wpn\zmb_build_completed.wav,,,GRP_WPN,,,,,,grp_weapon,snp_wpn_1p_shot,,,,75,80,,,,,,,,,,,,,,,,,,,2d,,,NONLOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
zmb_buildable_complete,,,wpn\trial_complete.wav,,,GRP_WPN,,,,,,grp_weapon,snp_wpn_1p_shot,,,,75,80,,,,,,,,,,,,,,,,,,,2d,,,LOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
zmb_buildable_piece_add,,,wpn\relic_pickup.wav,,,GRP_WPN,,,,,,grp_weapon,snp_wpn_1p_shot,,,,75,80,,,,,,,,,,,,,,,,,,,2d,,,NONLOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
zmb_craftable_loop,,,wpn\zmb_building_lp.wav,,,GRP_WPN,,,,,,grp_weapon,snp_wpn_1p_shot,,,,75,80,,,,,,,,,,,,,,,,,,,2d,,,LOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
zmb_craftable_buy_shield,,,wpn\craftable.wav,,,GRP_WPN,,,,,,grp_weapon,snp_wpn_1p_shot,,,,75,80,,,,,,,,,,,,,,,,,,,2d,,,NONLOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
///////////////////////////////////////
// BUILD LOGIC //
///////////////////////////////////////
function build_logic(bench_fx_loc, final_flag, part1_flag, part2_flag, part3_flag, build_hint){
while(1){
if(level flag::get(part1_flag) && level flag::get(part2_flag) && level flag::get(part3_flag)){
self SetHintString("Hold &&1 to build "+build_hint);
self waittill("trigger", player);
self SetHintString("");
player PlaySound("zmb_craftable_loop");
PlayFX(level._effect["building_dust"], bench_fx_loc);
player thread crafting_hud(self, final_flag);
player thread custom_craft_anim();
player util::waittill_any("build_canceled", "build_completed");
player StopSounds();
if(self.built == true){
player PlaySound("zmb_craftable_complete");
self Delete();
break;
}
}else
wait(1);
}
}
///////////////////////////////////////
// PART PICKUP LOGIC //
///////////////////////////////////////
function part_pickup(flag, hint, part){
self SetCursorHint("HINT_NOICON");
self SetHintString("Press &&1 to pickup "+hint);
self waittill("trigger", player);
level flag::set(flag);
player PlaySound("zmb_buildable_piece_add");
wait(0.1);
PlayFX(level._effect["powerup_grabbed"], self.origin);
part Delete();
self Delete();
}
#define E115_FX "electric\fx_elec_sparks_bounce_blue"
#precache( "fx", E115_FX );
function e115_init(){
level flag::wait_till( "all_players_connected" );
elec_orb = Spawn("script_model",player.origin);
elec_orb SetModel("tag_origin");
PlayFXOnTag(E115_FX, elec_orb, "tag_origin");
level thread e115_update();
}
function e115_update(){
while(1){
f = anglesToForward(player.angles)*50;
r = anglesToRight(player.angles)*30+f;
r += (0,0,60);
elec_orb MoveTo(player.origin + r, .1, .0, 0);
wait(0.5);
}
}
#using scripts\codescripts\struct;
#using scripts\shared\array_shared;
#using scripts\shared\callbacks_shared;
#using scripts\shared\clientfield_shared;
#using scripts\shared\compass;
#using scripts\shared\exploder_shared;
#using scripts\shared\flag_shared;
#using scripts\shared\laststand_shared;
#using scripts\shared\math_shared;
#using scripts\shared\scene_shared;
#using scripts\shared\util_shared;
#insert scripts\shared\shared.gsh;
#insert scripts\shared\version.gsh;
#insert scripts\zm\_zm_utility.gsh;
#using scripts\zm\_load;
#using scripts\zm\_zm;
#using scripts\zm\_zm_audio;
#using scripts\zm\_zm_powerups;
#using scripts\zm\_zm_utility;
#using scripts\zm\_zm_weapons;
#using scripts\zm\_zm_zonemgr;
//#using scripts\zm\_zm_blockers;
#using scripts\shared\ai\zombie_utility;
//Perks
#using scripts\zm\_zm_pack_a_punch;
#using scripts\zm\_zm_pack_a_punch_util;
#using scripts\zm\_zm_perk_additionalprimaryweapon;
#using scripts\zm\_zm_perk_doubletap2;
#using scripts\zm\_zm_perk_deadshot;
#using scripts\zm\_zm_perk_juggernaut;
#using scripts\zm\_zm_perk_quick_revive;
#using scripts\zm\_zm_perk_sleight_of_hand;
#using scripts\zm\_zm_perk_staminup;
//Powerups
#using scripts\zm\_zm_powerup_double_points;
#using scripts\zm\_zm_powerup_carpenter;
#using scripts\zm\_zm_powerup_fire_sale;
#using scripts\zm\_zm_powerup_free_perk;
#using scripts\zm\_zm_powerup_full_ammo;
#using scripts\zm\_zm_powerup_insta_kill;
#using scripts\zm\_zm_powerup_nuke;
#using scripts\zm\montys_test;
//#using scripts\zm\_zm_powerup_weapon_minigun;
//Traps
#using scripts\zm\_zm_trap_electric;
#using scripts\zm\zm_usermap;
//*****************************************************************************
// MAIN
//*****************************************************************************
function main()
{
zm_usermap::main();
level thread e115_init();
level._zombie_custom_add_weapons =&custom_add_weapons;
//Setup the levels Zombie Zone Volumes
level.zones = [];
level.zone_manager_init_func =&usermap_test_zone_init;
init_zones[0] = "start_zone";
level thread zm_zonemgr::manage_zones( init_zones );
level.pathdist_type = PATHDIST_ORIGINAL;
}
function usermap_test_zone_init()
{
zm_zonemgr::add_adjacent_zone("start_zone","zone2","enter_zone2");
level flag::init( "always_on" );
level flag::set( "always_on" );
}
function custom_add_weapons()
{
zm_weapons::load_weapon_spec_fr0m_table("gamedata/weapons/zm/zm_levelcommon_weapons.csv", 1);
}
>class,zm_mod_level
>group,modtools
xmodel,skybox_default_day
material,luts_t7_default
fx,electric\fx_elec_sparks_bounce_blue //<----------------
// BSP
col_map,maps/zm/zm_montys_lab.d3dbsp
gfx_map,maps/zm/zm_montys_lab.d3dbsp
// Audio
sound,zm_montys_lab
scriptparsetree,scripts/zm/zm_montys_lab.gsc
scriptparsetree,scripts/zm/zm_montys_lab.csc
little_shoulder_devil()
{
x = ("50"); // 50 units in front of players face
y = ("50"); // 50 units to the right of player
z = ("50"); // 50 units above players shoulder
}
guardian_follow()
{
while(flag(var))
{
if(life <= 0)
{
ent moveto(player.origin+(x,y,z));
wait .05;
}
else
{
thread cooldown();
break;
}
}
}
(