It needs to be included in the client and server code, no weapon stub is
needed.

Here is the weapon script.
// Grapple Hook

WeaponData
{
    // Weapon data is loaded by both the Game and Client DLLs.
    "printname"        "GRAPPLE HOOK"
    "viewmodel"        "models/weapons/v_crossbow.mdl"
    "playermodel"    "models/weapons/w_crossbow.mdl"
    "anim_prefix"    "bow"
    "bucket"            "5"
    "bucket_position"    "2"


//    "clip_size"        "1"
//    "default_clip"        "5"
//    "primary_ammo"        "XBowBolt"
//    "secondary_ammo"    "None"

    "clip_size"                "-1"
    "clip2_size"            "-1"
    "primary_ammo"            "None"
    "secondary_ammo"        "None"
    "default_clip"            "-1"
    "default_clip2"            "-1"

    "autoswitchto"            "0"
    "autoswitchfrom"        "0"
    "weight"        "0"
    "item_flags"        "0"


    // Sounds for the weapon. There is a max of 16 sounds per category (i.e.
max 16 "single_shot" sounds)
    SoundData
    {
        "single_shot"    "Weapon_Crossbow.Single"
        "reload"    "Weapon_Crossbow.Reload"
        "special1"    "Weapon_Crossbow.BoltElectrify"
        "special2"    "Weapon_Crossbow.BoltFly"
    }

    // Weapon Sprite data is loaded by the Client DLL.
    TextureData
    {
        "weapon"
        {
                "font"        "WeaponIcons"
                "character"    "g"
        }
        "weapon_s"
        {
                "font"        "WeaponIconsSelected"
                "character"    "g"
        }
        "ammo"
        {
                "font"        "WeaponIcons"
                "character"    "w"
        }
        "crosshair"
        {
                "font"        "Crosshairs"
                "character"    "Q"
        }
        "autoaim"
        {
            "file"        "sprites/crosshairs"
            "x"        "0"
            "y"        "96"
            "width"        "24"
            "height"    "24"
        }
        "zoom"
        {
                "font"        "Crosshairs"
                "character"    "Q"
        }
        "zoom_autoaim"
        {
            "file"        "sprites/crosshairs"
            "x"        "24"
            "y"        "112"
            "width"        "104"
            "height"    "16"
        }
    }
}

On Mon, Aug 17, 2009 at 3:54 PM, Matt Hoffman
<[email protected]>wrote:

> Doesn't appear to work for OB SP. Compiles fine, added it to the
> c_weapon__stubs_hl2 (STUB_WEAPON_CLASS( weapon_grapple, WeaponGrapple,
> C_BaseHLCombatWeapon ); ) but can't get it in game. Even copy-and pasted a
> weapon_crossbow weapon script and renamed to weapon_grapple to no dice.
>
> Just get:
> ] give weapon_grapple
> Attempted to create unknown entity type weapon_grapple!
> NULL Ent in GiveNamedItem!
>
>
> On Mon, Aug 17, 2009 at 2:58 PM, Gabriel <[email protected]> wrote:
>
> > Thank you so much! I will take a look at it!
> >
> > Gabriel Smith
> >
> > On Aug 17, 2009, at 5:38 PM, Ryan Sheffer <[email protected]> wrote:
> >
> > I have posted the Obsidian Conflict Grapple Hook code on the Source SDK
> > wiki
> > for all to view.
> >
> > http://developer.valvesoftware.com/wiki/Grapple_Hook
> >
> > I am sure it would come in handy, all you would need to do is get a
> > barnacle
> > weapon view model and world model going, and perhaps change the color of
> > the
> > rope used, and the hook model.
> >
> > Cheers,
> >
> > On Sun, Aug 9, 2009 at 5:56 PM, Gabriel Smith <[email protected]>
> wrote:
> >
> > ob
> >
> > Gabriel Smith
> >
> >
> >
> >
> > ________________________________
> > From: "Adam "amckern" McKern" <[email protected]>
> > To: Discussion of Half-Life Programming <[email protected]
> >
> > Sent: Sunday, August 9, 2009 5:45:01 PM
> > Subject: Re: [hlcoders] Barnacle weapon
> >
> > It uses a sprite attachment - are you doing this in goldsrc or ob?
> >
> > --------
> > Owner Nigredo Studios http://www.nigredostudios.com
> >
> > --- On Mon, 10/8/09, Harry Jeffery <[email protected]>
> wrote:
> >
> > From: Harry Jeffery <[email protected]>
> > Subject: Re: [hlcoders] Barnacle weapon
> > To: "Discussion of Half-Life Programming" <
> [email protected]
> >
> > Received: Monday, 10 August, 2009, 7:41 AM
> >
> > I think it used a rope for the visuals but for moving the player I have
> no
> > idea.
> >
> > 2009/8/9 Gabriel <[email protected]>:
> > I am trying to implement a barnacle like weapon like the weapon in
> > Hl:OP in my mod. Does any one know the extendable tougue was made,
> > since I am sure it was not just a long cillinder modeled in.
> >
> > Gabriel Smith
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > To unsubscribe, edit your list preferences, or view the list archives,
> > please visit:
> > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >
> >
> >
> > _______________________________________________
> > To unsubscribe, edit your list preferences, or view the list archives,
> > please visit:
> > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >
> >
> >
> >
> >
> >
> >
> __________________________________________________________________________________
> > Find local businesses and services in your area with Yahoo!7 Local.
> > Get started: http://local.yahoo.com.au
> > _______________________________________________
> > To unsubscribe, edit your list preferences, or view the list archives,
> > please visit:
> > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >
> >
> >
> > _______________________________________________
> > To unsubscribe, edit your list preferences, or view the list archives,
> > please visit:
> > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >
> >
> >
> >
> > --
> > ~Ryan ( skidz )
> > _______________________________________________
> > To unsubscribe, edit your list preferences, or view the list archives,
> > please visit:
> > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > To unsubscribe, edit your list preferences, or view the list archives,
> > please visit:
> > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >
> >
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>


-- 
~Ryan ( skidz )
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to