Classes:Actor

From ECWolf Wiki
Revision as of 05:27, 11 June 2013 by Blzut3 (talk | contribs) (→‎DECORATE Definition)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.
Actor
Actor type Internal Game MiniECWolfLogoIcon.png
DoomEd Number None Class Name Actor


Classes: Actor
 →All other classes

Overview

This is the base class from which all other actors are derived. This class determines the default values for properties and exposes the basic set of action pointers and variables available to all actors. Actors inherit from this class implicitly.

DECORATE Definition

actor Actor native
{
  Damage 0
  Radius 20
  Height 16
  Health 1000
  SightTime 1
  Speed 0
  Points 0
  MinMissileChance 200
  MissileFrequency 1.0
  MeleeRange 44
  Scale 1.0

  native angle_t angle;
  native int health;

  action native A_ActiveSound(int chance=256);
  action native A_AlertMonsters();
  action native A_BossDeath();
  action native A_CallSpecial(int special, int arg1=0, int arg2=0, int arg3=0, int arg4=0, int arg5=0);
  action native A_ChangeFlag(string flag, bool value);
  action native A_Chase(state melee="*", state ranged="*", int flags = 0);
  action native A_CustomMissile(string missiletype, float spawnheight = 32, int spawnoffset = 0, float angle = 0, int aimflags = 0);
  action native A_Dormant();
  action native A_Explode(int damage = 128, int radius = 128, int flags = XF_HURTSOURCE, bool alert = false, int fulldamageradius = 0);
  action native A_FaceTarget(float max_turn = 0, float max_pitch = 270);
  action native A_Fall();
  action native A_GiveExtraMan(int amount = 1);
  action native A_GiveInventory(string type, int amount = 0);
  action native A_Jump(int chance, state frame, ...);
  action native A_JumpIf(bool expression, state frame);
  action native A_JumpIfCloser(float distance, state frame);
  action native A_JumpIfInventory(string type, int amount, state frame);
  action native A_Look(int flags = 0, float minseedist = 0, float maxseedist = 0, float maxheardist = 0, float fov = 180);
  action native A_LookEx(int flags = 0, float minseedist = 0, float maxseedist = 0, float maxheardist = 0, float fov = 180); // Alias
  action native A_MeleeAttack(int damage, float accuracy = 0.6275);
  action native A_MonsterRefire(int chance, state abort);
  action native A_Pain();
  action native A_PlaySound(string soundname);
  action native A_Scream();
  action native A_SpawnItem(string type, float distance = 0, float zheight = 0);
  action native A_SpawnItemEx(string type, float xoffset = 0, float yoffset = 0, float zoffset = 0, float xvel = 0, float yvel = 0,
                              float zvel = 0, float angle = 0, int flags = 0, int failchance = 0);
  action native A_Stop();
  action native A_TakeInventory(string type, int amount);
  action native A_WolfAttack(int flags = 0, string sound = "*", float snipe = 1.0, int maxdamage = 64, int blocksize = 128,
                             int pointblank = 2, int longrange = 4, float runspeed = 160.0);

  states
  {
    Spawn:
      TNT1 A -1
      stop
  }
}