UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

How do I Make a Custom Specialist Weapon?

broken avatar :(
Created 3 years ago
by Chadric273
0 Members and 1 Guest are viewing this topic.
731 views
broken avatar :(
×
broken avatar :(
Location: Minnesota
Date Registered: 7 July 2012
Last active: 2 years ago
Posts
40
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
Chadric273's Groups
Chadric273's Contact & Social Linkschadric.hjellming
Hello. Basically I have a weapon already ported and functioning perfectly just like a normal weapon, but I am wondering about how to turn it into a specialist weapon? I want it to stay with the player and just have to recharge to use again just like annhilator. I look at the annhilator weapon script which is below:
 
Code Snippet
Plaintext
#insert scripts\shared\shared.gsh;
#insert scripts\shared\version.gsh;
#insert scripts\shared\abilities\_ability_util.gsh;

#using scripts\codescripts\struct;

#using scripts\shared\array_shared;
#using scripts\shared\callbacks_shared;
#using scripts\shared\clientfield_shared;
#using scripts\shared\flag_shared;
#using scripts\shared\hud_util_shared;
#using scripts\shared\system_shared;
#using scripts\shared\util_shared;

#using scripts\zm\_zm_audio;
#using scripts\zm\_zm_hero_weapon;
#using scripts\zm\_zm_spawner;
#using scripts\zm\_zm_utility;

#using scripts\shared\ai\zombie_utility;
#using scripts\shared\ai\systems\gib;

#define STR_ANNIHILATOR "hero_annihilator"

#namespace zm_weap_annihilator;

REGISTER_SYSTEM( "zm_weap_annihilator", &__init__, undefined )
   
function __init__()
{
    zm_spawner::register_zombie_death_event_callback( &check_annihilator_death );
   
    zm_hero_weapon::register_hero_weapon( STR_ANNIHILATOR );
   
    level.weaponAnnihilator = GetWeapon( STR_ANNIHILATOR );
}

function check_annihilator_death( attacker )//self = zombie
{
    if ( isdefined( self.damageweapon ) && !( self.damageweapon === level.weaponNone ))
    {
        if ( IS_EQUAL( self.damageweapon, level.weaponAnnihilator ) )
        {
            self zombie_utility::gib_random_parts();        
            GibServerUtils::Annihilate( self );            
        }
    }
}

Can I just rename some of the items in this and associate it with the custom weapon's name and file name?
 
Any help would be much appreciated!

 
Loading ...