1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. All Content Posted on PortalCentric Is for educational purposes: Copyright Disclaimer Under Section 107 of the Copyright Act 1976, allowance is made for "fair use" for purposes such as criticism, comment, news reporting, teaching, scholarship, and research. Fair use is a use permitted by copyright statute that might otherwise be infringing. Educational or personal use tips the balance in favor of fair use.
    Dismiss Notice
  3. Guest New members have their posts moderated
    Refer To This

    Thread for further information
    Dismiss Notice
Dismiss Notice

Hello Guest
Please Help Us keep PortalCentric up and running, Donate Here

Dismiss Notice
Guest
We have updated our terms and conditions, please familiarise yourself with them Here
    1. There are currently no users chatting.

    You don't have the necessary permissions to use the chat.

    1. #1 OrganicDeveloper, Oct 10, 2016
      Last edited: Oct 10, 2016
      Setting up traps

      This is a simple tutorial on how to setup traps for your map
      - Electric traps:

      • First download the already made prefabs here:
      • Trap base zapper prefab:

        Hello guest, Please Register or login to view links

      • Zapper emitters and beam prefab:

        Hello guest, Please Register or login to view links

      • Trap switch box prefab:

        Hello guest, Please Register or login to view links

      • Trap lights prefab:

        Hello guest, Please Register or login to view links

      • 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 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.
      • Now it's time to set up the required FX and code for the traps, open up mapname.gsc in usermaps/mapname/scripts/zm
      • Under powerups add the following:
        Code:
        //Traps
        #using scripts\zm\_zm_trap_electric;
      • Below the last #using put the following:
      Code:
      //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" );
      #precache( "fx", "electric/fx_elec_sparks_burst_sm_circuit_os" );
      #precache( "fx", "zombie/fx_powerup_on_green_zmb" );
      
      • Add the following function or modify your own to the script anywhere:
        Code:
        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";
        }
      • Then finally call the function in the main():
        Code:
        //FX
        precache_fx();
      • 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", Very Important!
      • You can now rebuild the map and use the trap.
      Credits: DTZxPorter
       

    Share This Page