Difference between revisions of "Classes:Weapon"

From ECWolf Wiki
(Created page with "{{Actor| | type = Internal | name = Weapon | class = Weapon }}Classes: {{Class|Actor}} → {{Class|Inventory}} → <u>Weapon</u><br>  →{{Class|WolfWeapon}}...")
 
m
 
(One intermediate revision by the same user not shown)
Line 4: Line 4:
 
| class = Weapon
 
| class = Weapon
 
}}[[Classes]]: {{Class|Actor}} &rarr; {{Class|Inventory}} &rarr; <u>Weapon</u><br>
 
}}[[Classes]]: {{Class|Actor}} &rarr; {{Class|Inventory}} &rarr; <u>Weapon</u><br>
 +
&nbsp;&rarr;{{Class|WeaponGiver}}<br>
 
&nbsp;&rarr;{{Class|WolfWeapon}}<br>
 
&nbsp;&rarr;{{Class|WolfWeapon}}<br>
  
Line 28: Line 29:
 
   action native [[A_GunAttack]](int flags = 0, string sound = "*", float snipe = 1.0, int maxdamage = 64,
 
   action native [[A_GunAttack]](int flags = 0, string sound = "*", float snipe = 1.0, int maxdamage = 64,
 
                             int blocksize = 128, int pointblank = 2, int longrange = 4, int maxrange = 21);
 
                             int blocksize = 128, int pointblank = 2, int longrange = 4, int maxrange = 21);
 +
  action native [[A_GunFlash]](state frame="Flash");
 +
  action native [[A_Light]](int level);
 +
  action native [[A_Light0]]();
 +
  action native [[A_Light1]]();
 +
  action native [[A_Light2]]();
 
   action native [[A_Lower]]();
 
   action native [[A_Lower]]();
 
   action native [[A_Raise]]();
 
   action native [[A_Raise]]();

Latest revision as of 05:30, 11 June 2013

Note: Wait! Stop! Before you copy this actor's definition into your mod, remember the following things:
  1. You do not need to copy that actor, since it is already defined.
  2. In fact, it's not just useless, it's actually harmful as it can cause problems.
  3. If you want to modify it, or use a modified version, using inheritance is the way to go.
  4. The actor definitions here are put on the wiki for reference purpose only. Learn from them, don't copy them.
  5. There is only one exception: if what you want is changing Ammo capacity, you need to create a new type from Ammo.
Weapon
Actor type Internal Game MiniECWolfLogoIcon.png
DoomEd Number None Class Name Weapon


Classes: ActorInventoryWeapon
 →WeaponGiver
 →WolfWeapon

Overview

This is the base class for all weapons.

DECORATE Definition

actor Weapon : Inventory native
{
  inventory.pickupsound "misc/w_pkup"
  weapon.ammotype1 "None"
  weapon.ammogive1 0
  weapon.ammouse1 0
  weapon.bobrangex 1.0
  weapon.bobrangey 1.0
  weapon.bobspeed 1.0
  weapon.bobstyle "Normal"
  weapon.yadjust 0

  action native A_CustomPunch(int damage, bool norandom=false, int flags=0, string pufftype="",
                              float range=0, float lifesteal=0); 
  action native A_FireCustomMissile(string missiletype, float angle=0, bool useammo=true,
                                    int spawnoffset=0, int spawnheight=0, bool aim=false, float pitch=0);
  action native A_GunAttack(int flags = 0, string sound = "*", float snipe = 1.0, int maxdamage = 64,
                            int blocksize = 128, int pointblank = 2, int longrange = 4, int maxrange = 21);
  action native A_GunFlash(state frame="Flash");
  action native A_Light(int level);
  action native A_Light0();
  action native A_Light1();
  action native A_Light2();
  action native A_Lower();
  action native A_Raise();
  action native A_ReFire();
  action native A_WeaponReady();
}