Announcement

Collapse
No announcement yet.

Use own weapons

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Use own weapons

    Hey there.
    I've spend the whole day trying to get custom weapons work:
    this is the way i tried:

    I wanted to just double an existing weapon, in this case the sniper rifle:

    I've created an *.cpp and*.h file similar to the normal sniper, but with the names of almost every variable changed to the new sniper.
    I added a custom Script file with information about the new sniper.
    I added a row in the equipment ressource.

    When i compile and run, join an offline game and select weapons, i can see my new sniper there and i also can see the model and the 2dpreview image.
    But when i start and actually am ingame, my hands are empty.
    Its not that only the model is missing, its like i've got no weapon where i chose my custome one.
    What and where do i have to add in the sourcecode to get it work?

    And i wonder where i can find the weapon descriptions.
    In the scrips/ [...] .txt is only a cast to #asw_weapon[...]attributes but i just cant find the actual text and stuff
    thanks, pnx!
    Last edited by pnx; 3 Aug 2010, 03:16 AM.

  • #2
    Any errors in the console?

    Does creating the entity directly work? (at the console do: asw_ent_create asw_weapon_whatever and it should appear under you cursor)

    Comment


    • #3
      Attempted to create unknown entity type asw_weapon_velosnipe!

      so yeah the entity creation failes. what do i have to do to make my weapon a new entity

      Comment

      Working...
      X