player object
object +-- player
Description
Functions
(All functions are public)
void AddMoney(int nMoney) void SetMoney(int nMoney) int GetMoney() void SetEnemy(player pNewEnemyPlayer) void SetNeutral(player pNewNeutralPlayer) void SetAlly(player pNewAllyPlayer) void SetScriptData(int nDataIndex, int nDataValue) int GetScriptData(int nDataIndex) void SetScriptUnit(int nUnitIndex, unitex uUnit) void SetScriptUnit(int nUnitIndex, unitex uUnit, int bKeepKilled) unitex GetScriptUnit(int nUnitIndex) void GiveAllUnitsTo(player pPlayer) void GiveAllUnitsTo(player pPlayer, int nX, int nY, int nRange) - not implemented void GiveAllBuildingsTo(player pPlayer) void GiveAllBuildingsTo(player pPlayer, int nX, int nY, int nRange) - not implemented void GiveTo(player pPlayer, unit uUnit) int GetNumberOfUnits() int GetNumberOfUnits(int nUnitFlags) int GetNumberOfUnits(int nX, int nY, int nRange) - not implemented int GetNumberOfBuildings() int GetNumberOfBuildings(int nBuildingType) int GetNumberOfBuildings(int nX, int nY, int nRange) - not implemented void EnableAI(int nEnable) void EnableAIFeatures(int nFlags, int nEnable) void EnableAIFeatures2(int nFlags, int nEnable) int GetStartingPointX() int GetStartingPointY() int IsPointLocated(int nX, int nY, int nZ) int IsPointLocated(int nX, int nY) void Defeat() void Victory() void LookAt(int nX, int nY, int nZ, int nAlpha, int nView, int nTunnel) void DelayedLookAt(int nX, int nY, int nZ, int nAlpha, int nView, int nTunnel, int nDelay, int nDirection) void SetName(string strPlayerName) string GetName() int GetMoneyCollectedByNow() int GetMoneySentToBase() int GetMoneySentToOrbit() void EnableSendingToBase(int nEnable) void EnableMilitaryUnitsLimit(int nEnable) void SetMilitaryUnitsLimit(int nUnitsLimit) void GetMilitaryUnitsLimit() void SetPointToAssemble(int nPointNum, int nX, int nY, int nZ) void SetPointToGuard(int nPointNum, int nX, int nY, int nZ) void SetPointToAvoid(int nPointNum, int nX, int nY, int nZ) void SetPointToQuarter(int nPointNum, int nX, int nY, int nZ) int GetIFF() int GetIFFNumber() void EnableResearch(string strResearchID, int nEnable) void AddResearch(string strResearchID) void EnableBuilding(string strBuildingID, int nEnable) unitex CreateUnit(int nX, int nY, int nZ, string strScript, string strChasis, string strWeapon0, string strWeapon1, string strWeapon2, string strWeapon3) int GetRace() void CreateDefaultUnit(int nX, int nY, int nZ) void RussianAttack(int nX, int nY, int nZ) void Attack(int nX, int nY, int nZ) void Attack(unit uTarget) void RussianAttack(unit uTarget) void ChooseEnemy(player pEnemyPlayer) void SetMaxTankPlatoonSize(int nSize) void SetMaxHelicopterPlatoonSize(int nSize) void SetMaxShipPlatoonSize(int nSize) void SetNumberOfOffensiveTankPlatoons(int nCount) void SetNumberOfOffensiveShipPlatoons(int nCount) void SetNumberOfOffensiveHelicopterPlatoons(int nCount) void SetNumberOfDefensiveTankPlatoons(int nCount) void SetNumberOfDefensiveShipPlatoons(int nCount) void SetNumberOfDefensiveHelicopterPlatoons(int nCount) void LoadScript(string strScript) void EnableStatistics(int nEnable) void CopyResearches(player pFromPlayer) void AddToMainTargetList(unit uTarget) void ClearMainTargetList() void AddToPreferenceList(int nBuildingType) void ClearPreferenceList() void SetMaxAttackFrequency(int nFrequency) int GetMaxAttackFrequency() int IsAlive() int IsEnemy(player pPlayer) int IsAlly(player pPlayer) int IsNeutral(player pPlayer) int GetMoneyFromFinishedMissions() unitex CreateUnitEx(int nX, int nY, int nZ, string strScript, string strChasis, string strWeapon0, string strWeapon1, string strWeapon2, string strWeapon3) unitex CreateUnitEx(int nX, int nY, int nZ, string strScript, string strChasis, string strWeapon0, string strWeapon1, string strWeapon2, string strWeapon3, int nShieldUpdateNum) player GetMainEnemy() void SetAllowGiveUnits(int bSet) int IsAllowGiveUnits() void SetAllowGiveMoney(int bSet) int IsAllowGiveMoney() int GetSideColor() void SetSideColor(int nNewSideColor) void EnableCommand(int nCommand, int bEnable) int IsCommandEnabled(int nCommand) int IsCommandDisabled(int nCommand) void SetBuildingTypeRecyclePercent(int nBuildingType, int nPercent) int GetBuildingTypeRecyclePercent(int nBuildingType) void SetDefaultUnitsRecyclePercent(int nPercent) int GetDefaultUnitsRecyclePercent() void AddUnitToSpecialTab(unit uUnit, int bAdd, int nPos) void SetMaxDistance(int nDistance) int GetMaxDistance()
Enums
Player AI features:
aiBuildMiningBuildings aiBuildMiningUnits aiControlMiningUnits aiBuildSupplyBuildings aiBuildSupplyUnits aiControlSupplyUnits aiBuildPowerBuildings aiBuildResearchBuildings aiControlResearches aiControlDefense aiControlOffense aiBuildBuilders aiBuildRepairers aiBuildShadows aiBuildScreamers aiBuildSuperAttack aiEnabled aiBuildTanks aiBuildShips aiBuildHelicopters aiBuildCivilFactory aiBuildMilitaryFactory aiBuildShipyard aiBuildBuildings aiBuildSpecialUnits aiRush aiUpgradeCannons aiEverything aiDefenseTowers aiRejectAlliance
Player AI features 2 (same as AI features plus):
ai2BuildingTowers ai2BuildFromStartingPoint ai2BuildSappers ai2ChooseEnemy ai2NeutralAI ai2BNSendResult
Player races: [MP]
raceUCS raceED raceLC
Commands [MP]:
commandStop commandLand commandMove commandAttack commandAttackOnPoint commandEscort commandHoldPosition commandPatrol commandSetHarvestPoint commandRepair commandConvert commandRepaint commandUpgrade commandSetUpgradeWeapons commandSetUpgradeChasis commandSetUpgradeShield commandSetRepairMode commandSetConvertMode commandSetRepaintMode commandSetUpgradeMode commandSetRepaintSideColor commandSetContainerSource commandGetSingleContainer commandSetContainerDestination commandEnter commandSendSupplyRequest commandFlyForSupply commandBuildBuilding commandBuildTrench commandBuildFlatTerrain commandBuildWall commandBuildRoad commandBuildWideBridge commandBuildNarrowBridge commandBuildWideTunnel commandBuildNarrowTunnel commandMineTerrainClose commandMineTerrainMedium commandMineTerrainFar commandMineTerrainLine commandSetTransporterSupplyCenter commandMoveToSupplyCenterForLoading commandTransporterGetUnit commandTransporterPutUnit commandTransporterPutUnitToPoint commandTransporterDropUnit commandTransporterDropUnitToPoint commandTransporterSetTransportMode commandTransporterSetAutoGetPoint commandTransporterSetAutoPutPoint commandKeepFormation commandSetLights commandSetAttackMode commandSetMovementMode commandDisposePlatoon commandAddUnitToPlatoon commandRemoveUnitFromPlatoon commandRotatePlatoonLeft commandRotatePlatoonRight commandUserNoParam0 commandUserNoParam1 commandUserNoParam2 commandUserNoParam3 commandUserNoParam4 commandUserNoParam5 commandUserNoParam6 commandUserNoParam7 commandUserNoParam8 commandUserNoParam9 commandUserOneParam0 commandUserOneParam1 commandUserOneParam2 commandUserOneParam3 commandUserOneParam4 commandUserOneParam5 commandUserOneParam6 commandUserOneParam7 commandUserOneParam8 commandUserOneParam9 commandUserObject0 commandUserObject1 commandUserObject2 commandUserObject3 commandUserObject4 commandUserObject5 commandUserObject6 commandUserObject7 commandUserObject8 commandUserObject9 commandUserPoint0 commandUserPoint1 commandUserPoint2 commandUserPoint3 commandUserPoint4 commandUserPoint5 commandUserPoint6 commandUserPoint7 commandUserPoint8 commandUserPoint9 commandUserLine0 commandUserLine1 commandUserLine2 commandUserLine3 commandUserLine4 commandUserLine5 commandUserLine6 commandUserLine7 commandUserLine8 commandUserLine9 commandUserDoubleLine0 commandUserDoubleLine1 commandUserDoubleLine2 commandUserDoubleLine3 commandUserDoubleLine4 commandUserDoubleLine5 commandUserDoubleLine6 commandUserDoubleLine7 commandUserDoubleLine8 commandUserDoubleLine9 commandUserArea0 commandUserArea1 commandUserArea2 commandUserArea3 commandUserArea4 commandUserArea5 commandUserArea6 commandUserArea7 commandUserArea8 commandUserArea9 commandScriptPlayerSpecialBuildNextAngle commandScriptPlayerSpecialSetRepaintSideColorDialog commandScriptPlayerSpecialChangeUnitsScript commandScriptPlayerSpecialShowTransporterAutoGetPoint commandScriptPlayerSpecialShowTransporterAutoPutPoint commandBuildingSuperAttack commandAutodestruction commandSoldBuilding commandBuildingCreateRain commandBuildingCreateSnow commandBuildingCreateRainStorm commandBuildingCreateMeteorRain commandBuildingCreateWind commandBuildingRemoveCloud commandBuildingSpyPlayer0 commandBuildingSpyPlayer1 commandBuildingSpyPlayer2 commandBuildingSpyPlayer3 commandBuildingSpyPlayer4 commandBuildingSpyPlayer5 commandBuildingSpyPlayer6 commandBuildingSpyPlayer7 commandBuildingSpyPlayer8 commandBuildingSpyPlayer9 commandBuildingSpyPlayer10 commandBuildingSpyPlayer11 commandBuildingSpyPlayer12 commandBuildingSpyPlayer13 commandBuildingSpyPlayer14 commandBuildingSpyPlayer15