TR Command


[(      )] trActivateTrigger(<eventID>) : Activates (sets active = true) the trigger specified by the given eventID. 

[(      )] trAddArmyToPlan(armyname, planname): Adds the units in the specified army to the specified plan. 

[(      )] trAICommsAttackUnits(playerID, armyToAttack): playerID will attack armyToAttack, sent via player Comms. 

[(      )] trAICommsCancelOrder(sendToPlayerID): tell player sendToPlayerID to cancel order, sent via player Comms. 

[(      )] trAICommsClaim(sendToPlayerID): tell player sendToPlayerID to claim TradePost at (locX, locY, locZ), sent via player Comms. 

[(      )] trAICommsDefendPoint(playerID, defendX, defendY, defendZ): playerID will defend point(defendX, defendY, defendZ), sent via player Comms. 

[(      )] trAICommsRequestTribute(fromPlayerID, resource, amount): fromPlayerID will send resource of x amount, sent via player Comms. 

[(      )] trAICommsTrain(sendToPlayerID, unitTypeName): tell player sendToPlayerID to train Units of type unitTypeName, sent via player Comms. 

[(      )] trAIFunc(<playerID> <functionName> <param>: Makes the camera shake. 

[(      )] trArmyDispatch(army info string , string protoname , count , x,y,z , Heading , bool Clear): creates the units in the army specified. 

[(      )] trArmyPlayerDefakify(armyname) : Defakifies the army. 

[(      )] trArmyPlayerFakify(armyname, fakeplayerindex) : Fakifies the army to the specified fake player index. 

[(      )] trArmySelect(army info string): selects the units in the army specified. 

[(      )] trArmySelectInt(int playerID, int armyID): selects the units in the army specified. 

[(      )] trAttackUnits(srcArmyname, armyToAttack, planname): srcArmy units will attack armyToAttack in the given planname. 

[(      )] trBlockAllAmbientSounds(): blocks all ambient sounds from this point forward 

[(      )] trBlockAllSounds(excludeDialog): Blocks all sounds from playing from this point forward 

[(      )] trBranchScenario(<dialog message>): pop up a dialog allowing choice to load a scenario. 

[(      )] trBuildingIsOnCursor(protoname) : Returns true if the proto unit specified is on the cursor and is a building. 

[(      )] trCameraCut( pos, dir, up, right ): puts the camera in the specified location. 

[(      )] trCameraLockOnUnit( <enable> <time to orient> <trigger ID>) : Orients the camera to the selected unit, and keeps it locked on that unit. ): puts the camera in the specified location. 

[(      )] trCameraPanWithUnit( <enable> <trigger ID>) : Moves the camera in the same direction that a particular unit moves. 

[(      )] trCameraShake(<duration> <strength>: Makes the camera shake. 

[(      )] trCampaignAdvance(): advances the campaign (advance user profile, AND plays the next scenario). 

[(      )] trCampaignAdvanceProgress(): advances the user progress through the campaign.(updates user profile only) 

[(      )] trCampaignPlayCurrent(): plays the current scenario in the campaign 

[(      )] trCamTrackLoad(<filename>): Loads a camera track. 

[(      )] trCamTrackPlay(<duration> <eventID>): plays the current camera track. 

[(      )] trChatHistoryClear: forces the chat history to reset 

[(      )] trChatHistoryContains(text): returns whether or not the current chat history has any instance (substring) of this text 

[(      )] trChatSend(fromID message): Changes the chat status. 

[(      )] trChatSendSpoofed(fromID message): Changes the chat status, but does not append player. 

[(      )] trChatSendSpoofedToPlayer(fromID toID message): Changes the chat status, but does not append player. Goes to specific player. 

[(      )] trChatSendToPlayer(fromID toID message): Changes the chat status for one specific player. 

[(      )] trChatSetStatus(<onOff>): Changes the chat status. 

[(      )] trCinematicAbort(): returns the abort cinematic status. 

[(      )] trCinematicDoAbort(): aborts the cinematic. 

[(      )] trClearCounterDisplay() 

[(      )] trCounterAbort(name): abort a counter. 

[(      )] trCounterAddTime(name, start, stop, message, event): start a counter that may or may not fire an event. 

[(      )] trCounterAddTimeMs(name, start, stop, message, event): start a counter that may or may not fire an event. 

[(      )] trCounterAddUnit(name, playerid, count, protounit, message, event): start a counter that may or may not fire an event. 

[(      )] trCounterAddXP(name, playerid, count, message, event): start a counter that may or may not fire an event. 

[(      )] trCountUnitsInArea(centerUnit, matchPlayer, matchType, range) 

[(      )] trCreateAttackPlan(armyName, PlanName, attackPlayerID, attackX, attackY, attackZ, engageRange, evaluationFrequency) : No help 

[(      )] trCreateDefendPlan(armyName, defendPlanName, defendX, defendY, defendZ, engageRange, evaluationFrequency, gatherdistance) : No help 

[(      )] trCreateRevealer(playerID, revealerName, position, revealerLOS, blackmapOnly) : Creates a revealer with the given attributes. 

[(      )] trCreateTreaty 

[(      )] trCurrentPlayer(): returns the current player. 

[(      )] trDamageUnit(amt): does a specific amount of damage to HP in instant typeless damage. 

[(      )] trDamageUnitPercent(percent): does % percent of a unit's total HP in instant typeless damage. 

[(      )] trDamageUnitsInArea(player, unitType, dist, damage): All units within dist of the selected ref object that match type take dmg 

[(      )] trDefendUnits(srcArmyname, defendedArmyname, planname, evaluationFrequency, gatherdistance): srcArmy units will defend defendedArmyUnits in the given planname. 

[(      )] trDelayedRuleActivation( <rulename> ): adds a rule to the runtime to be activated on the next update. 

[(      )] trDisableTrigger(<eventID>) : Disables (sets active = false) the trigger specified by the given eventID. 

[(      )] trEcho( <echoString> ): Trigger echo. 

[(      )] trEchoStatValue(player, stat) : fetch a stat value from the KB and echo to chat 

[(      )] trEndGame: Signal that the game has ended. 

[(      )] trEventFire(<eventID>): cause an event to occur. 

[(      )] trEventSetHandler(<eventID> <handler>): sets a handler function for an event id. 

[(      )] trFadeOutAllSounds(<duration>): Fades out all sounds over a given duration 

[(      )] trFadeOutMusic(<duration>): Fades out current music over a given duration. 

[(      )] trForbidProtounit(player, protoname): adds protounit to the forbidden list 

[(      )] trForceNonCinematicModels(): forces models to be in non cinematic mode 

[(      )] trFormationScale(scale): scales the formation size of formations in the game. 

[(      )] trGameLoadScenario(<scenario name>): start a game using scenario. 

[(      )] trGamePause(<true/false>): pause or unpause the game. 

[(      )] trGetNumberNuggetsGathered : Returns the number of nuggets gathered by the specified player. 

[(      )] trGetNumberSelectedUnitIDs() 

[(      )] trGetSelectedUnitID(int index) 

[(      )] trGetStatValue(player, stat) : fetch a stat value from the KB 

[(      )] trGetWorldDifficulty() 

[(      )] trGrantVP(player, number): Grants a number of Scenario VP to a player 

[(      )] trHasNuggetBeenCollected : Returns true if the nugget has been collected, the playerID is an optional parameter for querying if the specific player has collected it. 

[(      )] trHasPlayerSentHCShipment(<targetHCPlayerID>) : Returns true when the player has sent a shipment from the home city. 

[(      )] trImmediateUnitGarrison( <unitScenarioName> ): Instantly garrisons units inside another unit without considering distance. 

[(      )] trIsGadgetVisible(<name>): returns true if gadget is real. 

[(      )] trIsMovieNotPlaying() -- returns false if a movie is currently playing 

[(      )] trIsPlayerSelectingHCBuilding(<hcBuildingName>) : Returns true if the current player is selecting the building in their HC which has the specified name. 

[(      )] trIsPlayerSendingHCShipment(<targetHCPlayerID>) : Returns true when the player sends a shipment from home city. 

[(      )] trIsPlayerVisitingHC(<targetHCPlayerID>) : Returns true if the current player is looking at (visiting) the home city of the player specified by the player ID passed in. 

[(      )] trKillAIPlan(playerID, planName) : No help 

[(      )] trLetterBox(<onOff>): Turns letter box mode on or off. 

[(      )] trMessageSetText(<text><timeout>): displays the message text. 

[(      )] trMinimapFlare(<playerID> <duration> <position> <flash>): Sends a Minimap flare to a certain player. 

[(      )] trModeEnter(<name>): enters the mode specified. 

[(      )] trModifyProtounit(unit, player, field, delta): modifies proto unit data for this scenario only. 

[(      )] trMusicPlay(<filename> <duration>): Plays the music file. 

[(      )] trMusicPlayCurrent(): Plays the current music. 

[(      )] trMusicSetCurrentMusicSet(): sets the current music set. 

[(      )] trMusicSetMood(<moodID>): Changes the music to mood associated with mood id. 

[(      )] trMusicStop(): Stops the current music. 

[(      )] trObjectGettingWorked(objectScenarioName): Returns true if the object is currently being worked. 

[(      )] trObjectiveComplete(objectiveID, forceComplete, playSound): Completes the specified objective. Forces a reoccurring objective complete if forceComplete is true. 

[(      )] trObjectiveDiscover(objectiveID, playSound): 'Discovers' a previously unknown (to the player) objective. 

[(      )] trObjectiveHide(objectiveID): Hides the specified objective on the UI. 

[(      )] trObjectiveShow(objectiveID): Shows the specified objective on the UI. 

[(      )] trOverlayText(message, time, x, y, width, background) : puts up a big movie-credits style text overlay, optionally in a strange location, and now with a background 

[(      )] trPlayerActive(playerID): returns true/false if the player is active. 

[(      )] trPlayerAtPopCap(playerID): returns true if player is at pop cap. 

[(      )] trPlayerBuildingCount(playerID): returns the number of buildings for the player. 

[(      )] trPlayerControlsSocket(playerID, objectScenarioName): Returns true if the specified player is built on the specified socket. 

[(      )] trPlayerCountBuildingInProgress(playerID protoname): returns true if building is being built. 

[(      )] trPlayerCurrentXPCount(playerID): Returns the current (not total) XP for the player. 

[(      )] trPlayerDefeated(playerID): returns true/false if the player has been defeated. 

[(      )] trPlayerGetDiplomacy(playerID playerID): gets the diplomacy status between players. 

[(      )] trPlayerGetPopulation(playerID): returns the player population. 

[(      )] trPlayerGrantResources(player, resource, amount): advances the campaign. 

[(      )] trPlayerKillAllBuildings(<playerID> Kills all of the buildings of a given player. 

[(      )] trPlayerKillAllUnits(<playerID> Kills all of the units of a given player. 

[(      )] trPlayerModifyLOS(playerID cansee playerID): Adds/removes LOS between players. 

[(      )] trPlayerOverrideArtCulture(playerID, culture) : Overrides the culture used for choosing the player's art. 

[(      )] trPlayerOverrideSoundCiv(playerID, civilization) : Overrides the civilization used for choosing the player's vocal sound effects. 

[(      )] trPlayerResetBlackMap(<playerID>: Resets the black map for a given HUMAN player. 

[(      )] trPlayerResetBlackMapForAllPlayers(Resets the black map for all HUMAN players. 

[(      )] trPlayerResourceCount(playerID, resource): returns the number of resources for the player. 

[(      )] trPlayerSetActive(playerID): sets the active player. 

[(      )] trPlayerSetAge(playerID, age, displayEffect): Sets the age of the specified player. 

[(      )] trPlayerSetDiplomacy(playerID playerID status): sets the diplomacy status between players. 

[(      )] trPlayerSetHCAccess(playerID, hcAccess): Sets whether the player has access to the HC. 

[(      )] trPlayerToggleAllowNewCWSpawning(playerID, allowSpawning) : Toggles whether the player can spawn new covered wagons. 

[(      )] trPlayerToggleAllowTCSpawning(playerID, allowSpawning) : Toggles whether the player's TC can spawn units. 

[(      )] trPlayerTribute(from, resource, amount to): tributes resources to a player. 

[(      )] trPlayerUnitAndBuildingCount(playerID): returns the number of units and buildings for the player. 

[(      )] trPlayerUnitCount(playerID): returns the number of units for the player. 

[(      )] trPlayerUnitCountSpecific(playerID, protoName): returns the number of units for the player. 

[(      )] trPlayerVPCount(playerID): returns the number of victory points for the player. 

[(      )] trPlayMovie(<FileName>) -- plays movies from the AVI directory 

[(      )] trPlayNextMusicTrack(): Plays the next song in the music play list. 

[(      )] trQuestVarCopy(var1, var2) : copies value of one of the trigger scratch variables 

[(      )] trQuestVarEcho(varname, value) : chats out the value of one of the trigger scratch variables 

[(      )] trQuestVarGet(varname) : retrieve value of a trigger scratch variable, returns zero if unset 

[(      )] trQuestVarSet(varname, value) : sets one of the trigger scratch variables 

[(      )] trQuestVarSetFromRand(varname, minval, maxval, round) : sets one of the trigger scratch variables within a random range 

[(      )] trRateConstruction(<rate>): modify construction rate. 

[(      )] trRateResearch(<rate>): modify research rate. 

[(      )] trRatesNormal(void): restore all rates to normal. 

[(      )] trRateTrain(<rate>): modify training rate. 

[(      )] trRenderRain(<float percent>): controls rain rendering. 

[(      )] trRenderSky(<true/false> <skyName>): turn sky rendering on/off and set which sky to use. 

[(      )] trRenderSnow(<float percent>): controls snow rendering. 

[(      )] trRevealEntireMap(): shows whole map, similar to how revealed mode works 

[(      )] trSetCinematicUnitSpeaking(objectScenarioName, speaking, duration): Sets the unit as speaking or not. 

[(      )] trSetCounterDisplay(text) 

[(      )] trSetCurrentPlayerStatus(<active>): sets the current player as active or inactive. 

[(      )] trSetFogAndBlackmap(<true/false> <true/false>): turn fog and black map on/off. 

[(      )] trSetLighting(setname, fadetime): fades to the specified lighting set over fadetime. 

[(      )] trSetObscuredUnits( <bool> ): Sets whether or not units can be drawn obscured or not. 

[(      )] trSetPauseInObjectiveWindow() 

[(      )] trSetPauseOnAgeUpgrade() 

[(      )] trSetPlayerDefeated: call this when a player is defeated on the local machine (meaning that this func must be called synchronously on all machines, it will not pass around a command.) 

[(      )] trSetPlayerWon: call this when a player has won on the local machine (meaning that this func must be called synchronously on all machines, it will not pass around a command.) 

[(      )] trSetRevealerActiveState(revealerName, active) : Finds the specified revealer and sets it to active or inactive. 

[(      )] trSetShadowFarClip( <enable>, <distance> ): Enable or disables the shadow far clippping plane. 

[(      )] trSetUnitIdleProcessing( <bool> ): Sets whether or not units can do their idle processing. 

[(      )] trSetUserControls(<active>): sets the player controls on or off. 

[(      )] trShowCampaignDlg(NextCampaign): . 

[(      )] trShowChoiceDialog(maintext, choice1, event1, choice2, event2) : displays dialog with 2 choices, and activates a trigger in response 

[(      )] trShowDamage 

[(      )] trShowHCView(playerID): Sets the view to the HC if the player specified is the current player. 

[(      )] trShowImageDialog(texture, subtitle) : displays a custom image in a dialog, with a subtitle 

[(      )] trShowSPCNote(<Title> <Text>): Displays the SPC Note Dlg with the specified title and text. 

[(      )] trShowWinLose(text, soundfile): message and sound. 

[(      )] trShowWorldView(playerID): Sets the view to the world if the player specified is the current player. 

[(      )] trSoundPlayDialog(<filename>, <event>, <ignoreOnAbort>, <subtitle>, <portrait>): Plays the sound associated with the filename. 

[(      )] trSoundPlayDialogue(<stringID>, <eventID>, <ignoreOnAbort>, <seconds>): Plays the sound associated with the dialogue. 

[(      )] trSoundPlayFN(<filename>): Plays the sound associated with the filename. 

[(      )] trSoundPlayPaused(<filename>): Plays the sound associated with the filename. 

[(      )] trSoundTimer(long milliseconds, long eventID) creates a high performance sound timer and passes the eventID as data. 

[(      )] trStartGameRecord: add help string. 

[(      )] trStopGameRecord: add help string. 

[(      )] trTechSetStatus(playerID techID status): sets the tech status for the player. 

[(      )] trTechStatusActive(playerID techID): returns true if tech is active for player. 

[(      )] trTechStatusCheck(playerID, techID, techStatus): returns true if tech's status is techStatus. 

[(      )] trTechStatusResearching(playerID techID): returns true if tech is being researched for player. 

[(      )] trTime( void ): Returns the current gametime in Seconds. 

[(      )] trTimeMS( void ): Returns the current gametime in Milliseconds. 

[(      )] trTradeRouteSetLevel(traderouteindex, level) : Sets the specified trade route to the specified level from a trigger. 

[(      )] trTradeRouteSetPosition(position): Places train on a specified position on the route. 

[(      )] trTradeRouteToggleState(position): Enable or disables the unit from showing. 

[(      )] trUIFadeToColor(<r> <g> <b> <duration> <delay> <inout>): fade in/out using color specified. 

[(      )] trUIFlash(<gadget name> <flashLimit> <colorR> <colorG> <colorB>): flashes a UI element. 

[(      )] trUIFlashCategory(<category> <flash>): flashes a UI element (maybe). 

[(      )] trUIFlashTech(<tech id> <flash>): flashes a UI element (maybe). 

[(      )] trUIFlashTrain(<proto name> <flash>): flashes a UI element (maybe). 

[(      )] trUIStopFlash(<gadget name>): stops the flashing of a UI element. 

[(      )] trUnBlockAllAmbientSounds(): Unblocks all ambient sounds that were previously blocked from playing 

[(      )] trUnblockAllSounds(): Unblocks all sounds that were previously blocked from playing 

[(      )] trUnforbidProtounit(player, protoname): removes protounit from the forbidden list 

[(      )] trUnitAlive( void ): Returns true if all selected units are alive. 

[(      )] trUnitBuildUnit( <protoUnitName> <BVector position (x,y,z): Selects units and makes the build a unit at specified location 

[(      )] trUnitChangeName(name): set an override name for a specific unit 

[(      )] trUnitChangeProtoUnit : changes the proto unit for a given set of units. 

[(      )] trUnitCinematicRemoveControlAction() - Removes the current control action so the next thing can take effect immediately. (For IGC) 

[(      )] trUnitConvert(playerID): converts the selected units to player. 

[(      )] trUnitCreate( <protoName> <scenarioName> <x> <y> <z> <heading> <playerID> ): creates a new unit. 

[(      )] trUnitDead( void ): Returns true if all selected units are dead. 

[(      )] trUnitDelete( remove ): removes or kills the selected unit(s). 

[(      )] trUnitDestroy(void): destroys the selected unit(s). 

[(      )] trUnitDistanceToPoint( <x> <y> <z> ): Returns the shortest distance between the trRT units and the point. 

[(      )] trUnitDistanceToUnit( <unitScenarioName> ): Returns the shortest distance between the trRT units and the given unit. 

[(      )] trUnitDistanceToUnitID( <unitID> ): Returns the shortest distance between the trRT units and the given unit. 

[(      )] trUnitDoWorkOnUnit( <unitScenarioName> <eventID> ): Tasks the selected unit(s) to perform work on the given unit. 

[(      )] trUnitEjectContained : ejects all contained units. 

[(      )] trUnitFaceUnit( <unitScenarioName> <eventID> : Moves the selected unit(s) to face the given unit. 

[(      )] trUnitGarrison( <unitScenarioName> <eventID> ): Tasks the selected unit(s) to garrision into another unit. 

[(      )] trUnitGetContained : returns the number of units contained. 

[(      )] trUnitGetHeading( <scenarioName> ): returns the units heading. 

[(      )] trUnitGetIsContained(protounit) : returns true if this unit is contained by the specified protounit. 

[(      )] trUnitHasLOS(playerID): returns true if the player can see the selected unit, otherwise returns false. 

[(      )] trUnitHighlight(seconds) : does something to highlight the units selected. 

[(      )] trUnitIsOwnedBy(playerID): determines if the selected units are owned by the player specified. 

[(      )] trUnitIsSelected : returns if the specified unit is selected. 

[(      )] trUnitMakeInvulnerable( <enable> ) : Makes a unit invulnerable to damage. Turn it off to return the unit to normal. 

[(      )] trUnitMoveFromArea( <x> <y> <z> <eventID> <bAttackMove> <player> <unitType> <radius>): Moves all matching units near the selected unit(s) to the given position. 

[(      )] trUnitMoveToPoint( <x> <y> <z> <eventID> <bAttackMove> <bUnitRun> <runSpeedMultiplier>): Moves the selected unit(s) to the given position. 

[(      )] trUnitMoveToUnit( <unitScenarioName> <eventID> <bAttackMove> <bUnitRun> <runSpeedMultiplier>): Moves the selected unit(s) to the spot occupied by the given unit. 

[(      )] trUnitPercentComplete : returns the percent complete as 0 to 100 

[(      )] trUnitPercentDamaged : returns the percent damaged as 0 to 100 

[(      )] trUnitPlayerDefakify() : Sets the selected unit as not having a fake player 

[(      )] trUnitPlayerFakify(fakePlayerIndex) : Sets the selected unit as having the fake player with the specified index (0-7) 

[(      )] trUnitSelect( <unitScenarioName> ): 'Selects' the unit in the trigger selection system. 

[(      )] trUnitSelectByID( <unitID> ): 'Selects' the unit in the trigger selection system. 

[(      )] trUnitSelectClear( void ): Clears the units in the trigger selection system. 

[(      )] trUnitSetAnimation( <AnimName> <versionIndex> <loop> <eventID> <destroyOnNextControlAction> ): Sets the cinematic animation version for the selected unit(s). 

[(      )] trUnitSetHeading( <degrees> ): sets the units heading. 

[(      )] trUnitSetHP( <hitpoints> ): set the hitpoints for all selected units. 

[(      )] trUnitSetStance : set the stance for the given set of units. 

[(      )] trUnitSuspendAction( actionName, <suspend> ) : Makes an action on a unit suspened or not. 

[(      )] trUnitTeleport : moves units from current position to position specified 

[(      )] trUnitTypeIsSelected : returns if the specified unit is selected. 

[(      )] trUnitVisToPlayer(playerID): returns true if the player can see the selected unit, and it is on screen. 

[(      )] trVPAnnualAwards(enable): enables/disables the award of VP's each year. 

[(      )] trWaypointAddPoint( <vector> ): Adds the waypoint into the trigger selection system. 

[(      )] trWaypointAddUnit( <unitScenarioName> ): Adds the unit's position as a waypoint in the trigger selection system. 

[(      )] trWaypointClear( void ): Clears the waypoints in the trigger selection system. 

[(      )] trWriteToLog(message): Writes text to the Age3Log 

[(      )] trYouLose(text): player loses, specifies message. 

[(      )] trYouWin(directToMenu): player wins. If you set directToMenu to true, you go directly to Campaign Menu.