Difference between revisions of "CWorm"

From Project X Wiki
Jump to: navigation, search
(Fields)
 
(Fields)
Line 56: Line 56:
 
FirePower: Weapon fire power.
 
FirePower: Weapon fire power.
  
FireAngle: Weapon fire angle.
+
FireAngle: Weapon fire angle (0.0 - 1.0).
  
 
CanFire: Reflects whether the worm is allowed to shoot. After shot was made it sets to false. Changing it to true after that allows worm to make second shot.
 
CanFire: Reflects whether the worm is allowed to shoot. After shot was made it sets to false. Changing it to true after that allows worm to make second shot.

Revision as of 21:11, 24 August 2011

Up one category:
Scripting


Worms Armageddon class
Wormimage.png
Class name: CWorm
Description: Describes a worm
Constructor: CWorm::CWorm(CObject* Parent, int aTeam, int aIndex, CWormParams* params);
Derived From: CGObject


Describes a worm.

Fields

class CWorm : CGObject
{
    int       WormTeam;
    int       WormNumber;
    int       SomeControlBased;
    int       LabelColor;
    int       KnockedOut;  
    int       WeaponN; 
    fixed     DispHealth; 
    fixed     TargHealth; 
    int       ShowHealthChgLbl; 
    int       GotDamage;
    int       TurnSide;
    int       PressedUp; 
    int       PressedDown; 
    int       PressedLeft; 
    int       PressedRight; 
    int       JetFuel;  
    fixed     FirePower;    
    fixed     FireAngle; 
    int       nTotalShoots;  
    int       nAvalShoots; 
    bool      CanFire; 
    int       nShooted;
    int       nShoots;
    int       TimeToFire;
    int       WeapLatency; 
    int       SelectX; 
    int       SelectY; 
    int       AnimHelper; 
    CWeapon*  CurWeapon;
};

TurnSide: Reflects wich side the worm is oriented. -1 for left, 1 for right.

WormTeam: Worm team number (1-6).

WormNumber: Worm number relative to the team (1-8).

WeaponN: Currently selected weapon number in table?

DispHealth: Displayed worm available health.

GotDamage: Displayed amount of damage worm has received. (Appears above worm. After damage was shown it sets back to 0)

JetFuel: Jetpack fuel?

FirePower: Weapon fire power.

FireAngle: Weapon fire angle (0.0 - 1.0).

CanFire: Reflects whether the worm is allowed to shoot. After shot was made it sets to false. Changing it to true after that allows worm to make second shot.

CurWeapon: Pointer to currently selected weapon.