


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!//||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
//|||| Name : ugx_fx.gsc
//|||| Info : Easiest way to implement FX in your map.
//|||| Site : [url=http://www.ugx-mods.com]www.ugx-mods.com[/url]
//|||| Author : [UGX] treminaor
//|||| Notes : contact 'treminaor' on xFire for more info/suggestions/help
//|||| Version : 1.1 (7/17/2011) Changes: Added 'stationary_loop' function.
//|||| Instructions: Read the code comments. I strongly advise that you download Notepad++ (free text editor) and go to Language>C>C++ so that this is easy to read (syntax highlighting)
//||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
//|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
//Initial Setup:
// Open your raw/maps/mapname.gsc
// Find: 'maps\_zombiemode::main();'
//
// Place 'maps\ugx_easy_fx::fx_setup()' on the LINE BEFORE 'maps\_zombiemode::main();'.
//
// Place 'level thread maps\ugx_easy_fx::fx_start()' on the LINE AFTER 'maps\_zombiemode::main()'
//
// Copy this file to /mods/mapname/maps/
// Open Launcher, go to the Mod tab, click your mod in the list, then find and CHECK this file in the right side box. Then Build MOD.
//
//
//
//Radiant Setup:
// Spawn a script_struct where you want the fx to appear. The CENTER of this red box is the origin of the spwaned fx. The fx will use the angles and rotation of the struct, so pretend you are placing the fx as if you could see it.
// Give the script_struct these REQUIRED KvP's:
// targetname, fx
// script_noteworthy, alias (where alias is the name of the fx... example: if you wanted level._effect["fire1"], you would enter fire1 for alias.
// script_string, usage (where usage is either stationary, use, or touch. See bottom of file for explainations.)
//
//
// REQUIRED KvP's FOR USE AND TOUCH SETUP
// script_string, hint (this is for the TRIGGER, not the STRUCT - where hint is the hint string you want for the trigger, example: Press &&1 to start the fire) '&&1' will automatically change to the players USE button (F usually)
//
// REQUIRED KvP's FOR NON-LOOPING FX THAT YOU WANT TO LOOP
//
// If you are using stationary as your usage, you are done. Otherwise, continue:
//
// For USE usage, create a trigger_use. Then FIRST select the struct it will trigger, then SECOND hold shift and select the trigger. LASTLY, press W to link the two. You CAN have multiple structs per trigger.
//
// For TOUCH usage, create a trigger_multiple. Then set it up as you would a USE usage.
//
//
//
//
// Other REQUIRED preparation:
//
// If you are using 1.4 scripts, open your /zone_source/mapname_patch.csv
// Otherwise, open your /zone_source/mapname.csv
//
// Add these lines to it WITHOUT THE /* or */ - It does not matter if you add them at the beginning or end or middle of the file.
/*
fx,env/fire/fx_fire_brush_smolder_sm
fx,env/fire/fx_fire_detail_fade_14
fx,env/fire/fx_fire_blown_md_blk_smk_distant_w
fx,env/fire/fx_fire_oil_md
fx,env/fire/fx_fire_campfire_small
fx,env/fire/fx_fire_player_torso
fx,env/light/fx_glow_hanginglamp
fx,env/light/fx_glow_emergency_red_blink
fx,env/electrical/fx_elec_player_md
fx,maps/zombie/fx_zombie_wire_spark
fx,env/smoke/fx_smoke_smolder_sm_blk
fx,env/smoke/fx_smoke_smolder_md_gry
fx,env/smoke/fx_smoke_smolder_lg_gry
fx,env/smoke/fx_smoke_wood_chimney_med
fx,explosions/fx_default_explosion
fx,explosions/tank_impact_dirt
fx,maps/zombie/fx_zombie_wire_spark
*/
//
//
// NEXT (1.4): Compile your map to save the structs
// Older versions: don't compile until you're done with everything.
//
// NEXT, for 1.4,
// Open Launcher and click your mapname_patch in the list, then check 'Build FastFiles' and ensure 'Mod Specific Map' is checked and set to your mapname. Then click 'Build Map'.
//
// For other older versions, just compile your entire map again.
//
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// IF YOU REACH THE 400FX LIMIT, YOU MUST COMMENT OUT ( // before the line) ANY FX YOU DO NOT WANT IN fx_setup() - YOU ALSO MUST REMOVE THE INCLUDE LINE FROM YOUR CSV. THIS WILL PREVENT THE FX FROM LOADING INTO YOUR MAP.
//|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
#include common_scripts\utility;
#include maps\_utility;
#include maps\_zombiemode_utility;
fx_setup() //This is where the FX are precached. Any FX you want to use must be added to your mapname_patch.csv as well as listed below.
{
//|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
//Usage: level._effect["alias"] = loadFX("path/to/fx/name");
//Where 'alias' is your personal name for the fx that you will use later in the code, and 'path/to/fx/name' is the file location + name of the fx you want to assign to the variable. See below for examples:
//When entering the fx path, be sure to only include folder names that are within /raw/fx, and make sure to leave off the file extension (.efx).
//If you want to preview any of these FX, open Launcher, click the EffectsEd button, then File>Open the file you wish to preview. Then press the green play button.
//Fire\\
level._effect["fire1"] = loadFX("env/fire/fx_fire_brush_smolder_sm");
// level._effect["fire2"] = loadFX("env/fire/fx_fire_detail_fade_14");
// level._effect["fire3"] = loadFX("env/fire/fx_fire_blown_md_blk_smk_distant_w");
// level._effect["fire4"] = loadFX("env/fire/fx_fire_oil_md");
// level._effect["fire5"] = loadFX("env/fire/fx_fire_campfire_small");
// level._effect["fire6"] = loadFX("env/fire/fx_fire_player_torso");
//End Fire\\
// //Smoke/Smolder\\
// level._effect["smoke1"] = loadFX("env/smoke/fx_smoke_smolder_sm_blk");
// level._effect["smoke2"] = loadFX("env/smoke/fx_smoke_smolder_md_gry");
// level._effect["smoke3"] = loadFX("env/smoke/fx_smoke_smolder_lg_gry");
// level._effect["smoke4"] = loadFX("env/smoke/fx_smoke_wood_chimney_med");
//End Smoke/Smolder\\
//Explosions\\
// level._effect["explosion1"] = loadFX("explosions/fx_default_explosion"); //non stationary
// level._effect["explosion2"] = loadFX("explosions/tank_impact_dirt"); //non stationary
//End Explosions\\
// //Light Rays\\
// level._effect["light1"] = loadFX("env/light/fx_glow_hanginglamp");
// level._effect["light2"] = loadFX("env/light/fx_glow_emergency_red_blink");
// //End Light Rays\\
//Electrical\\
// level._effect["electric1"] = loadFX("env/electrical/fx_elec_player_md"); // 1.4 only!
// level._effect["electric2"] = loadFX("maps/zombie/fx_zombie_wire_spark"); // 1.4 only!
//End Electrical\\
//User-Additions\\
//Place your fx lines below this line, or below other fx in their respective sections.
level._effect["bugs1"] = loadFX("bio/insects/fx_insect_carcass_flies");
//End User-Additions\\
//|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
//DEBUG SETTING:
level.fx_debug = 1; // '1' = ON, 'undefined' = OFF
//|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
//Do not edit or add anything below this line.
}
fx_start()
{
fx_spots = getstructarray("fx","targetname");
if(isDefined(level.fx_debug))
{
if(fx_spots.size == 0 || !isDefined(fx_spots))
iPrintLn("Easy-FX: ^1ERROR: ^7No FX structs were found! Ensure that you used SCRIPT_STRUCTS and you gave them the correct TARGETNAME.");
else
iPrintLn("Easy-FX found "+fx_spots.size+" fx structs in your level.");
}
for(i=0;i<fx_spots.size;i++)
{
usage = fx_spots[i].script_string;
if(usage == "stationary")
fx_spots[i] thread stationary_fx();
if(usage == "stationary_loop")
fx_spots[i] thread stationary_fx(true);
else if(usage == "touch")
fx_spots[i] thread triggered_touch_fx();
else if(usage == "use")
fx_spots[i] thread triggered_use_fx();
else if(usage == "use_loop")
fx_spots[i] thread triggered_use_fx(true);
else if(usage == "touch_loop")
fx_spots[i] thread triggered_touch_fx(true);
else if(!isDefined(fx_spots[i].script_string))
if(isDefined(level.fx_debug)) iPrintLn("Easy-FX: ^1ERROR: ^7FX struct at origin "+fx_spots[i].origin+" is missing its stript_string for fx usage! Set it as stationary, use, or touch.");
}
}
stationary_fx(loop) //These are untriggered FX that will play on loop while the level is running.
{
fx = self.script_noteworthy;
if(!isDefined(fx) && isDefined(level.fx_debug)) iPrintLn("Easy-FX: ^1ERROR: ^7 FX struct at origin "+self.origin+" is missing its script_noteworthy for fx name!");
fxTag = "tag_origin";
self.fx = Spawn( "script_model", self.origin );
self.fx SetModel( "tag_origin" );
self.fx.angles = self.angles;
self.fx.origin = self.origin;
self.fx LinkTo( self, fxTag );
if(isDefined(loop))
{
if(!isDefined(self.speed))
{
self.speed = 1;
if(isDefined(level.fx_debug))iPrintLn("Easy-FX: ^1ERROR: ^7No speed was specified on the struct at origin "+self.origin+". It has defaulted to 1 second.");
}
PlayLoopedFX(level._effect[fx], self.speed, self.origin);
}
else
PlayFxOnTag( level._effect[fx], self.fx, fxTag );
}
triggered_touch_fx(loop) //These are triggered FX. They are triggered when the player walks though a trigger_multiple that you create in Radiant.
{
trigger = getEnt(self.target,"targetname");
if(!isDefined(trigger.script_string))
trigger.script_string = "SET THIS TEXT USING THE SCRIPT_STRING KVP ON THE TRIGGER";
trigger setHintString(trigger.script_string);
trigger SetCursorHint("HINT_NOICON");
fx = self.script_noteworthy;
trigger waittill("trigger");
fxTag = "tag_origin";
self.fx = Spawn( "script_model", self.origin );
self.fx SetModel( "tag_origin" );
self.fx.angles = self.angles;
self.fx.origin = self.origin;
self.fx LinkTo( self, fxTag );
if(isDefined(loop))
{
if(!isDefined(self.speed))
{
self.speed = 1;
if(isDefined(level.fx_debug))iPrintLn("Easy-FX: ^1ERROR: ^7No speed was specified on the struct at origin "+self.origin+". It has defaulted to 1 second.");
}
PlayLoopedFX(level._effect[fx], self.speed, self.origin);
}
else
PlayFxOnTag( level._effect[fx], self.fx, fxTag );
}
triggered_use_fx(loop) //These are triggered FX. They are triggered when the player uses a trigger (by pressing F) that you create in Radiant.
{
trigger = getEnt(self.target,"targetname");
if(!isDefined(trigger.script_string))
trigger.script_string = "SET THIS TEXT USING THE SCRIPT_STRING KVP ON THE TRIGGER";
trigger setHintString(trigger.script_string);
trigger SetCursorHint("HINT_NOICON");
fx = self.script_noteworthy;
trigger waittill("trigger");
fxTag = "tag_origin";
self.fx = Spawn( "script_model", self.origin );
self.fx SetModel( "tag_origin" );
self.fx.angles = self.angles;
self.fx.origin = self.origin;
self.fx LinkTo( self, fxTag );
if(isDefined(loop))
{
if(!isDefined(self.speed))
{
self.speed = 0.5;
if(isDefined(level.fx_debug))iPrintLn("Easy-FX: ^1ERROR: ^7No speed was specified on the struct at origin "+self.origin+". It has defaulted to 0.5 seconds");
}
PlayLoopedFX(level._effect[fx], self.speed, self.origin);
}
else
PlayFxOnTag( level._effect[fx], self.fx, fxTag );
}
// Materials
material,zombie_electric_shock_overlay
material,zombie_transporter_overlay
// Scripts
rawfile,animscripts/death.gsc
rawfile,animscripts/melee.gsc
rawfile,animscripts/scripted.gsc
rawfile,animscripts/utility.gsc
rawfile,animscripts/traverse/shared.gsc
rawfile,animscripts/traverse/zombie_jump_down_72.gsc
rawfile,animscripts/traverse/zombie_jump_down_96.gsc
rawfile,animscripts/traverse/zombie_jump_down_120.gsc
rawfile,animscripts/traverse/zombie_jump_down_127.gsc
rawfile,animscripts/traverse/zombie_jump_down_184.gsc
rawfile,animscripts/traverse/zombie_jump_down_190.gsc
rawfile,animscripts/traverse/zombie_jump_up_to_climb.gsc
rawfile,maps/_arcademode.gsc
rawfile,maps/_audio.gsc
rawfile,maps/_callbackglobal.gsc
rawfile,maps/_challenges_coop.gsc
rawfile,maps/_collectibles_game.gsc
rawfile,maps/_friendlyfire.gsc
rawfile,maps/_gameskill.gsc
rawfile,maps/_laststand.gsc
rawfile,maps/_load.gsc
rawfile,maps/_loadout.gsc
rawfile,maps/_mgturret.gsc
rawfile,maps/_zombiemode.gsc
rawfile,maps/_zombiemode_blockers_new.gsc
rawfile,maps/_zombiemode_spawner.gsc
rawfile,maps/_zombiemode_tesla.gsc
rawfile,maps/_zombiemode_weapons.gsc
rawfile,maps/_zombiemode_dogs.gsc
// Characters
rawfile,mptype/nazi_zombie_heroes.gsc
rawfile,character/char_zomb_player_0.gsc
rawfile,character/char_zomb_player_1.gsc
rawfile,character/char_zomb_player_2.gsc
rawfile,character/char_zomb_player_3.gsc
// Dog Anim Scripts
rawfile,animscripts/dog_combat.gsc
rawfile,animscripts/dog_death.gsc
rawfile,animscripts/dog_init.gsc
rawfile,animscripts/dog_pain.gsc
rawfile,animscripts/dog_move.gsc
rawfile,animscripts/dog_scripted.gsc
rawfile,animscripts/dog_stop.gsc
rawfile,animscripts/dog_flashed.gsc
// Client Scripts
rawfile,clientscripts/_callbacks.csc
rawfile,clientscripts/_footsteps.csc
rawfile,clientscripts/_lights.csc
rawfile,clientscripts/_load.csc
// Shellshock
rawfile,shock/dog_bite.shock
// Animtrees
rawfile,animtrees/dog.atr
rawfile,animtrees/generic_human.atr
rawfile,animtrees/zombie_cymbal_monkey.atr
// String Table
stringtable,mp/zombiemode.csv,,
// Menu
menufile,ui/hud.txt
// Model
//xmodel,collision_geo_32x32x128
fx,env/fire/fx_fire_brush_smolder_sm
#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()
{
game["tom_music_player"] = "tom_music_player";
PrecacheMenu( game["tom_music_player"] );
preCacheModel ("zombie_zapper_cagelight_green");
level thread maps\tom_music_player_unl::main();
level.DLC3 = spawnStruct(); // Leave This Line Or Else It Breaks Everything
// Must Change These To Your Maps
level.DLC3.createArt = maps\createart\nazi_zombie_prison_art::main;
level.DLC3.createFX = maps\createfx\nazi_zombie_prison_fx::main;
level.DLC3.myFX = ::preCacheMyFX;
/*--------------------
FX
----------------------*/
DLC3_FX();
/*--------------------
LEVEL VARIABLES
----------------------*/
// Variable Containing Helpful Text For Modders -- Don't Remove
level.modderHelpText = [];
//
// Change Or Tweak All Of These LEVEL.DLC3 Variables Below For Your Level If You Wish
//
// Edit The Value In Mod.STR For Your Level Introscreen Place
level.DLC3.introString = &"MOD_INTRO";
// Weapons. Pointer function automatically loads weapons used in Der Riese.
level.DLC3.weapons = maps\dlc3_code::include_weapons;
// Power Ups. Pointer function automatically loads power ups used in Der Riese.
level.DLC3.powerUps = maps\dlc3_code::include_powerups;
// Adjusts how much melee damage a player with the perk will do, needs only be set once. Stock is 1000.
level.DLC3.perk_altMeleeDamage = 1000;
// Adjusts barrier search override. Stock is 400.
level.DLC3.barrierSearchOverride = 400;
// Adjusts power up drop max per round. Stock is 3.
level.DLC3.powerUpDropMax = 3;
// _loadout Variables
level.DLC3.useCoopHeroes = true;
// Bridge Feature
level.DLC3.useBridge = false;
// Hell Hounds
level.DLC3.useHellHounds = true;
// Mixed Rounds
level.DLC3.useMixedRounds = true;
// Magic Boxes -- The Script_Noteworthy Value Names On Purchase Trigger In Radiant
boxArray = [];
boxArray[ boxArray.size ] = "start_chest";
boxArray[ boxArray.size ] = "chest1";
boxArray[ boxArray.size ] = "chest2";
boxArray[ boxArray.size ] = "chest3";
boxArray[ boxArray.size ] = "chest4";
boxArray[ boxArray.size ] = "chest5";
level.DLC3.PandoraBoxes = boxArray;
// Initial Zone(s) -- Zone(s) You Want Activated At Map Start
zones = [];
zones[ zones.size ] = "start_zone";
level.DLC3.initialZones = zones;
// Electricity Switch -- If False Map Will Start With Power On
level.DLC3.useElectricSwitch = true;
// Electric Traps
level.DLC3.useElectricTraps = true;
// _zombiemode_weapons Variables
level.DLC3.usePandoraBoxLight = true;
level.DLC3.useChestPulls = true;
level.DLC3.useChestMoves = true;
level.DLC3.useWeaponSpawn = true;
level.DLC3.useGiveWeapon = true;
// _zombiemode_spawner Varibles
level.DLC3.riserZombiesGoToDoorsFirst = true;
level.DLC3.riserZombiesInActiveZonesOnly = true;
level.DLC3.assureNodes = true;
// _zombiemode_perks Variables
level.DLC3.perksNeedPowerOn = true;
// _zombiemode_devgui Variables
level.DLC3.powerSwitch = true;
// Snow Feature
level.DLC3.useSnow = false;
/*--------------------
FUNCTION CALLS - PRE _Load
----------------------*/
level thread DLC3_threadCalls();
/*--------------------
ZOMBIE MODE
----------------------*/
[[level.DLC3.weapons]]();
[[level.DLC3.powerUps]]();
maps\ugx_easy_fx::fx_setup()
maps\_zombiemode::main();
level thread maps\ugx_easy_fx::fx_start()
/*--------------------
FUNCTION CALLS - POST _Load
----------------------*/
level.zone_manager_init_func = ::dlc3_zone_init;
level thread DLC3_threadCalls2();
}
dlc3_zone_init()
{
/*
=============
///ScriptDocBegin
"Name: add_adjacent_zone( <zone_1>, <zone_2>, <flag>, <one_way> )"
"Summary: Sets up adjacent zones."
"MandatoryArg: <zone_1>: Name of first Info_Volume"
"MandatoryArg: <zone_2>: Name of second Info_Volume"
"MandatoryArg: <flag>: Flag to be set to initiate zones"
"OptionalArg: <one_way>: Make <zone_1> adjacent to <zone_2>. Defaults to false."
"Example: add_adjacent_zone( "receiver_zone", "outside_east_zone", "enter_outside_east" );"
///ScriptDocEnd
=============
*/
// Outside East Door
//add_adjacent_zone( "receiver_zone", "outside_east_zone", "enter_outside_east" );
}
preCacheMyFX()
{
// LEVEL SPECIFIC - FEEL FREE TO REMOVE/EDIT
level._effect["snow_thick"] = LoadFx ( "env/weather/fx_snow_blizzard_intense" );
}
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() Nuclear | DARKLEGION's requested title |
![]() | Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager. |