ZScript actor functions

From ZDoom Wiki
Jump to navigation Jump to search
Note: This feature is for ZScript only.


This page lists ZScript-specific factors that are not part of the classic Action functions list. There is no guarantee these will work in DECORATE, especially anything that is not type int, double, bool or void.

This list does not include ZScript virtual functions.

Math

  • clearscope double AngleTo(Actor target, bool absolute = false) const
  • clearscope double PitchTo(Actor target, double zOfs = 0, double targZOfs = 0, bool absolute = false) const
  • clearscope static double DeltaAngle(double ang1, double ang2)
  • clearscope static double AbsAngle(double ang1, double ang2)
  • clearscope static Vector2 AngleToVector(double angle, double length = 1)
  • clearscope static Vector2 RotateVector(Vector2 vec, double angle)
  • clearscope static double Normalize180(double ang)
  • clearscope static double BobSin(double fb)
  • clearscope Vector2 Vec2To(Actor other) const
  • clearscope Vector3 Vec3To(Actor other) const
  • clearscope Vector3 Vec3Offset(double x, double y, double z, bool absolute = false) const
  • clearscope Vector3 Vec3Angle(double length, double angle, double z = 0, bool absolute = false) const
  • clearscope Vector2 Vec2Angle(double length, double angle, bool absolute = false) const
  • clearscope Vector2 Vec2Offset(double x, double y, bool absolute = false) const
  • clearscope Vector3 Vec2OffsetZ(double x, double y, double atz, bool absolute = false) const
  • void VelIntercept(Actor targ, double speed = -1, bool aimpitch = true, bool oldvel = false)
  • void VelFromAngle(double speed = 1e37, double angle = 1e37)
  • void Vel3DFromAngle(double speed, double angle, double pitch)

Checks

Information

Actor Control

Spawn Functions

  • static Actor Spawn(class<Actor> type, vector3 pos = (0,0,0), int replace = NO_REPLACE)
  • void SpawnTeleportFog(Vector3 pos, bool beforeTele, bool setTarget)
  • void SpawnBlood(Vector3 pos1, double dir, int damage)
  • void BloodSplatter(Vector3 pos, double hitangle, bool axe = false)
  • void SpawnDirt(double radius)

State Functions

Movement Functions

Monster AI

Sound Functions

Attack Functions

  • void RailAttack(FRailParams p)
  • double BulletSlope(out FTranslatedLineTarget pLineTarget = null, int aimflags = 0)
  • Actor SpawnMissile(Actor dest, class<Actor> type, Actor owner = null)
  • Actor SpawnMissileXYZ(Vector3 pos, Actor dest, Class<Actor> type, bool checkspawn = true, Actor owner = null)
  • Actor SpawnMissileZ(double z, Actor dest, class<Actor> type)
  • Actor SpawnMissileAngleZSpeed(double z, class<Actor> type, double angle, double vz, double speed, Actor owner = null, bool checkspawn = true)
  • Actor SpawnMissileZAimed(double z, Actor dest, Class<Actor> type)
  • Actor SpawnSubMissile(Class<Actor> type, Actor target)
  • Actor, Actor SpawnPlayerMissile(class<Actor> type, double angle = 1e37, double x = 0, double y = 0, double z = 0, out FTranslatedLineTarget pLineTarget = null, bool nofreeaim = false, bool noautoaim = false, int aimflags = 0)
  • Actor OldSpawnMissile(Actor dest, class<Actor> type, Actor owner = null)
  • Actor SpawnPuff(class<Actor> pufftype, vector3 pos, double hitdir, double particledir, int updown, int flags = 0, Actor victim = null)
  • void TraceBleed(int damage, Actor missile)
  • void TraceBleedAngle(int damage, double angle, double pitch)
  • void PoisonMobj (Actor inflictor, Actor source, int damage, int duration, int period, Name type)
  • double AimLineAttack(double angle, double distance, out FTranslatedLineTarget pLineTarget = null, double vrange = 0., int flags = 0, Actor target = null, Actor friender = null)
  • Actor, int LineAttack(double angle, double distance, double pitch, int damage, Name damageType, class<Actor> pufftype, int flags = 0, out FTranslatedLineTarget victim = null, double offsetz = 0., double offsetforward = 0., double offsetside = 0.)
  • Actor SpawnMissileAngle(class<Actor> type, double angle, double vz)
  • Actor SpawnMissileAngleZ(double z, class<Actor> type, double angle, double vz)
  • static void AimBulletMissile(Actor proj, Actor puff, int flags, bool temp, bool cba)
  • void DoMissileDamage(Actor target)

Inventory Functions

  • clearscope Inventory FindInventory(class<Inventory> itemtype, bool subclass = false) const
  • Inventory GiveInventoryType(class<Inventory> itemtype)
  • bool GiveInventory(Class<Inventory> type, int amount, bool givecheat = false)
  • bool TakeInventory(class<Inventory> itemclass, int amount, bool fromdecorate = false, bool notakeinfinite = false)
  • bool SetInventory(class<Inventory> itemclass, int amount, bool beyondMax = false)
  • bool UsePuzzleItem(int PuzzleItemType)
  • clearscope Inventory FirstInv()
  • Inventory DropInventory(Inventory item, int amt = -1)
  • bool GiveAmmo(Class<Ammo> type, int amount)
  • static bool DoGiveInventory(Actor receiver, bool orresult, class<Inventory> mi, int amount, int setreceiver)
  • bool DoTakeInventory(Actor receiver, bool orresult, class<Inventory> itemtype, int amount, int flags, int setreceiver = AAPTR_DEFAULT)
  • void TossItem()
  • clearscope int CountInv(class<Inventory> itemtype, int ptr_select = AAPTR_DEFAULT) const
  • bool CheckInventory(class<Inventory> itemtype, int itemamount, int owner = AAPTR_DEFAULT)
  • void ObtainInventory(Actor other)
  • bool InitSpawnedItem(Actor mo, int flags)
  • int GetAmmoCapacity(class<Ammo> type)
  • void SetAmmoCapacity(class<Ammo> type, int amount)

See also