LuaDocs/AHuman

From Data Realms Wiki

Revision as of 06:03, 13 May 2011 by LuaBot (Talk | contribs)
Jump to: navigation, search

Contents

Parent: Actor

Concrete Class. A humanoid actor.

Go back to Class Index


Enumerations

UpperBodyState

  • 0 = WEAPON_READY
  • 1 = AIMING_SHARP
  • 2 = HOLSTERING_BACK
  • 3 = HOLSTERING_BELT
  • 4 = DEHOLSTERING_BACK
  • 5 = DEHOLSTERING_BELT
  • 6 = THROWING_PREP
  • 7 = THROWING_RELEASE


MovementState

  • 0 = NOMOVE
  • 1 = STAND
  • 2 = WALK
  • 3 = CROUCH
  • 4 = CRAWL
  • 5 = ARMCRAWL
  • 6 = CLIMB
  • 7 = JUMP
  • 8 = DISLODGE
  • 9 = MOMENTSTATECOUNT


ProneState

  • 0 = NOTPRONE
  • 1 = GOPRONE
  • 2 = PRONE
  • 3 = PRONESTATECOUNT


Layer

  • 0 = FGROUND
  • 1 = BGROUND


DeviceHandlingState

  • 0 = STILL
  • 1 = POINTING
  • 2 = SCANNING
  • 3 = AIMING
  • 4 = FIRING
  • 5 = THROWING
  • 6 = DIGGING


SweepState

  • 0 = NOSWEEP
  • 1 = SWEEPINGUP
  • 2 = SWEEPINGPAUSE
  • 3 = SWEEPINGDOWN
  • 4 = SWEEMDOWNPAUSE


DigState

  • 0 = NOTDIGGING
  • 1 = PREDIG
  • 2 = STARTDIG
  • 3 = TUNNELING
  • 4 = FINISHINGDIG
  • 5 = PAUSEDIGGER


JumpState

  • 0 = NOTJUMPING
  • 1 = FORWARDJUMP
  • 2 = PREJUMP
  • 3 = UPJUMP
  • 4 = APEXJUMP
  • 5 = LANDJUMP


Properties

ClassName

The class name of this Entity.A string with the friendly-formatted type name of this object.

Head

Read-only property. The head AttachableA pointer to the head Attachable of this. Ownership is NOT transferred!

FGArm

Read-only property. The FG Arm as an Attachable. This is for Lua binding mostly.A pointer to the FG Arm Attachable of this. Ownership is NOT transferred!

BGArm

Read-only property. The BG Arm as an Attachable. This is for Lua binding mostly.A pointer to the BG Arm Attachable of this. Ownership is NOT transferred!

FGLeg

Read-only property. The FG Leg as an Attachable. This is for Lua binding mostly.A pointer to the FG Leg Attachable of this. Ownership is NOT transferred!

BGLeg

Read-only property. The BG Leg as an Attachable. This is for Lua binding mostly.A pointer to the BG Leg Attachable of this. Ownership is NOT transferred!

JetTimeTotal

Read-only property. The amount of time this' jetpack can fire when filled, in ms.The amount of time this' jetpack can fire when it's at max.

JetTimeLeft

Read-only property. The amount of time this' jetpack can still fire until out, in ms.The amount of time this' jetpack can still fire before running out.

EquippedItem

Read-only property. Returns whatever is equipped in the FG Arm, if anything. OINT.The currently equipped item, if any.

FirearmIsReady

Read-only property. Indicates whether the currently held HDFirearm's is ready for use, and has ammo etc.Whether a currently HDFirearm (if any) is ready for use.

ThrowableIsReady

Read-only property. Indicates whether the currently held ThrownDevice's is ready to go.Whether a currently held ThrownDevice (if any) is ready for use.

FirearmIsEmpty

Read-only property. Indicates whether the currently held HDFirearm's is out of ammo.Whether a currently HDFirearm (if any) is out of ammo.

FirearmNeedsReload

Read-only property. Indicates whether the currently held HDFirearm's is almost out of ammo.Whether a currently HDFirearm (if any) has less than half of ammo left.

FirearmIsSemiAuto

Read-only property. Indicates whether the currently held HDFirearm's is semi or full auto.Whether a currently HDFirearm (if any) is a semi auto device.


Functions

EquipFirearm

Switches the currently held device (if any) to the first found firearm in the inventory. If the held device already is a firearm, or no firearm is in inventory, nothing happens.

Arguments:

  • Whether to actually equip any mathcing item found in the inventory, or jsut report that it's there or not.

Return value:

Whether a firearm was successfully switched to, or already held.


EquipThrowable

Switches the currently held device (if any) to the first found ThrownDevice in the inventory. If the held device already is a ThrownDevice, or no ThrownDevice is in inventory, nothing happens.

Arguments:

  • Whether to actually equip any mathcing item found in the inventory, or jsut report that it's there or not.

Return value:

Whether a ThrownDevice was successfully switched to, or already held.


EquipDiggingTool

Switches the currently held device (if any) to the first found digging tool in the inventory. If the held device already is a digging tool, or no digging tool is in inventory, nothing happens.

Arguments:

  • Whether to actually equip any mathcing item found in the inventory, or jsut report that it's there or not.

Return value:

Whether a digging tool was successfully switched to.


EquipShield

Switches the currently held device (if any) to the first found shield in the inventory. If the held device already is a shield, or no shield is in inventory, nothing happens.

Arguments:

  • None.

Return value:

Whether a shield was successfully switched to, or already held.


EquipShieldInBGArm

Tries to equip the first shield in inventory to the background arm; this only works if nothing is held at all, or the FG arm holds a one-handed device, or we're in inventory mode.

Arguments:

  • None.

Return value:

Whether a shield was successfully equipped in the background arm.


UnequipBGArm

Unequips whatever is in the BG arm and puts it into the inventory.

Arguments:

  • None.

Return value:

Whether there was anything to unequip.


ReloadFirearm

Reloads the currently held firearm, if any.

Arguments:

  • None.

Return value:

None.


IsWithinRange

Tells whether a point on the scene is within close range of the currently used device and aiming status, if applicable.

Arguments:

  • A Vector with the aboslute coordinates of a point to check.

Return value:

Whether the point is within close range of this.


Look

Casts an unseen-revealing ray in the direction of where this is facing.

Arguments:

  • The degree angle to deviate from the current view point in the ray casting. A random ray will be chosen out of this +-range.
  • The range, in pixels, that the ray will have.

Return value:

Whether any unseen pixels were revealed by this look.


LookForGold

Casts a material detecting ray in the direction of where this is facing.

Arguments:

  • The degree angle to deviate from the current view point in the ray casting. A random ray will be chosen out of this +-range.
  • The range, in pixels, that the ray will have.
  • A Vector which will be filled with the absolute coordinates of any found gold. It will be unaltered if false is returned.

Return value:

Whether gold was spotted by this ray cast. If so, foundLocation has been filled out with the absolute location of the gold.


LookForMOs

Casts an MO detecting ray in the direction of where the head is looking at the time. Factors including head rotation, sharp aim mode, and other variables determine how this ray is cast.

Arguments:

  • The degree angle to deviate from the current view point in the ray casting. A random ray will be chosen out of this +-range.
  • A specific material ID to ignore (see through)
  • Whether to ignore all terrain or not (true means 'x-ray vision').

Return value:

A pointer to the MO seen while looking.


IsOnScenePoint

Indicates whether this' current graphical representation overlaps a point in absolute scene coordinates.

Arguments:

  • The point in absolute scene coordinates.

Return value:

Whether this' graphical rep overlaps the scene point.


Go back to Class Index

Personal tools