Setting up traps
Updated 183 Days AgoPublic

Electric traps:

First download the aleady made prefabs here:

Place them in BlackOps3Root/map_source/_prefabs/zm/zm_core.

First place the base zapper, this is the only one you have to modify when including more than one. (Change the KVP to trap_b or something similar to indicate more than one.)

After that you can place the emitters and box prefabs and align them with geometry.

You do not place the light prefab, it's for another prefab.

Open up mapname.gsc in usermaps/mapname/scripts/zm.

Below the last #using put the following:

//Trap
#precache( "fx", "dlc0/factory/fx_elec_trap_factory" );
#precache( "fx", "maps/zombie/fx_zombie_light_glow_green" );
#precache( "fx", "maps/zombie/fx_zombie_light_glow_red" );
#precache( "fx", "fx_zombie_light_elec_room_on" );
#precache( "fx", "zombie/fx_elec_player_md_zmb" );
#precache( "fx", "zombie/fx_elec_player_sm_zmb" );
#precache( "fx", "zombie/fx_elec_player_torso_zmb" );
#precache( "fx", "electric/fx_elec_sparks_burst_sm_circuit_os" );

Add the following function or`modify your own` to the script anywhere:

function precache_fx()
{
    level._effect["zapper"]                             = "dlc0/factory/fx_elec_trap_factory";
    level._effect["zapper_light_ready"]                 = "maps/zombie/fx_zombie_light_glow_green";
    level._effect["zapper_light_notready"]              = "maps/zombie/fx_zombie_light_glow_red";
    level._effect["elec_room_on"]                       = "fx_zombie_light_elec_room_on";
    level._effect["elec_md"]                            = "zombie/fx_elec_player_md_zmb";
    level._effect["elec_sm"]                            = "zombie/fx_elec_player_sm_zmb";
    level._effect["elec_torso"]                         = "zombie/fx_elec_player_torso_zmb";
    level._effect["elec_trail_one_shot"]                = "electric/fx_elec_sparks_burst_sm_circuit_os";
    level._effect["wire_spark"]                         = "electric/fx_elec_sparks_burst_sm_circuit_os";
}

Then finally call the function in the main():

//FX
precache_fx();
IMPORTANT: Repeat the entire mapname.gsc edits you just did on your mapname.csc as well, but wherever you see #precache( "fx", change it to #precache( "client_fx",.

You can now rebuild the map and use the trap.


More to come:

  • Flogger
  • Flinger

The following is the sound alias setup for it:

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
switch,,,zmb\trap\electrical\switch\flip_00.wav,,,UIN_MOD,,,,,BUS_FX,grp_ambience,,,,,90,95,0,200,201,,,,,,,,,,,,,,,,3d,,,NONLOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
fire_med,,,zmb\trap\electrical\ignite\ignite_00.wav,,,UIN_MOD,,fire_med_2,,,BUS_FX,grp_ambience,,,,,90,95,0,600,601,,,,,1,reject,,,,,,,,,,3d,,,NONLOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
fire_med_2,,,zmb\trap\electrical\ignite\body_burn\body_burn_00.wav,,,UIN_MOD,,sizzle_fire,,,BUS_FX,grp_ambience,,,,,90,95,0,600,601,,,,,1,reject,,,,,,,,,,3d,,,NONLOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
sizzle_fire,,,zmb\trap\electrical\ignite\body_burn\body_burn_00.wav,,,UIN_MOD,,,,,BUS_FX,grp_ambience,,,,,90,95,0,600,601,,,,,1,reject,,,,,,,,,,3d,,,NONLOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
amb_sparks,,,zmb\trap\electrical\switch\sparks\amb_sparks_l.wav,,,UIN_MOD,,,,,BUS_FX,grp_ambience,,,,,90,95,0,600,601,,,,,1,reject,,,,,,,,,,3d,,,NONLOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
amb_sparks,,,zmb\trap\electrical\sizzle\sizzle_00.wav,,,UIN_MOD,,,,,BUS_FX,grp_ambience,,,,,90,95,0,600,601,,,,,1,reject,,,,,,,,,,3d,,,NONLOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
wpn_zmb_electrap_zap,,,zmb\trap\electrical\arcs\arc_00.wav,,,UIN_MOD,,,,,BUS_FX,grp_ambience,,,,,90,95,0,700,701,,,,,1,reject,,,,,,,,,,3d,,,NONLOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
wpn_zmb_electrap_zap,,,zmb\trap\electrical\arcs\arc_01.wav,,,UIN_MOD,,,,,BUS_FX,grp_ambience,,,,,90,95,0,700,701,,,,,1,reject,,,,,,,,,,3d,,,NONLOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
wpn_zmb_electrap_zap,,,zmb\trap\electrical\arcs\arc_02.wav,,,UIN_MOD,,,,,BUS_FX,grp_ambience,,,,,90,95,0,700,701,,,,,1,reject,,,,,,,,,,3d,,,NONLOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
wpn_zmb_electrap_zap,,,zmb\trap\electrical\arcs\arc_03.wav,,,UIN_MOD,,,,,BUS_FX,grp_ambience,,,,,90,95,0,700,701,,,,,1,reject,,,,,,,,,,3d,,,NONLOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
zmb_ignite,,,zmb\trap\electrical\ignite\ignite_00.wav,,,UIN_MOD,,,,,BUS_FX,grp_ambience,,,,,90,95,0,600,601,,,,,,,,,,,,,,,,3d,,,NONLOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
wpn_zmb_inlevel_trap_start,,,zmb\trap\electrical\start\start_00.wav,,,UIN_MOD,,,,,BUS_FX,grp_ambience,,,,,90,95,0,800,801,,,,,,,,,,,,,,,,3d,,,NONLOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
wpn_zmb_inlevel_trap_loop,,,zmb\trap\electrical\loop\loop_00.wav,,,UIN_MOD,,wpn_zmb_electrap_pop,,,BUS_FX,grp_ambience,,,,,90,95,0,600,601,,,,,1,reject,,,,,,,,,,3d,,,LOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
wpn_zmb_inlevel_trap_stop,,,zmb\buildable\electrap\electrap_stop.wav,,,UIN_MOD,,,,,BUS_FX,grp_ambience,,,,,90,95,0,800,801,,,,,,,,,,,,,,,,3d,,,NONLOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
wpn_zmb_electrap_pop,,,zmb\trap\electrical\gibs\elec\elec_gibs_pop_00.wav,,,UIN_MOD,,,,,BUS_FX,grp_ambience,,,,,70,75,0,700,701,,,,,1,reject,,,,,,,,,,3d,,,NONLOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

You must rip the sounds yourself with Wraith for them to properly play in your mod.

Contributors
DTZxPorter
ZeRoY

Last Author
DTZxPorter
Subscribers
None
Projects
None