-
Notifications
You must be signed in to change notification settings - Fork 2
Editor & Script Setup
Before you start working with these scripts, you will need to add the included FGD file to Hammer (or JackHammer, if you use that).
For either editor, go to Tools -> Options -> Game Configurations / Game Profiles and then click on the Add button.
| Hammer | JackHammer |
|---|---|
![]() |
![]() |
The file you need to add is "svencoop_addon/scripts/maps/weapon_custom/v5/weapon_custom.fgd"
After adding the FGD, Click OK and restart the editor. You should see 9 new entities with the prefix of "weapon_custom" in your list.
In order to use weapon_custom, you have to initialize the scripts in your own map script. To do that, create a file in the "svencoop_addon/scripts/maps/" folder named my_map_script.as and write the following into it:
#include "weapon_custom/v5/weapon_custom"
void MapInit()
{
WeaponCustomMapInit();
}
void MapActivate()
{
WeaponCustomMapActivate();
}
Then, in your map cfg, write in this line:
map_script my_map_script
Say, for example, your map is already set up for another script (like func_vehicle_custom). All you need to do is merge the two files, without duplicating the MapInit() and MapActivate() functions.
This is what weapon_custom would look like merged with func_vehicle_custom:
#include "func_vehicle_custom"
#include "weapon_custom/v5/weapon_custom"
void MapInit()
{
VehicleMapInit( true, true );
WeaponCustomMapInit();
}
void MapActivate()
{
WeaponCustomMapActivate();
}
When you're done with this, you're ready to make your first weapon.

