0% found this document useful (0 votes)
10 views

XEd Scriptlist v.1.0

Uploaded by

Srdjan Martinov
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

XEd Scriptlist v.1.0

Uploaded by

Srdjan Martinov
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Script Command Reference

Common command parameters

These are some of the attribute types that are shared by many different commands.

AgentRefList
This type of attribute contains a list of references to instances of. Editing an attribute of this type, by
double-clicking will bring up a list on the left -hand side of all the agents defined on the map. Adding
them to the right-hand list will add references to these agent instances, and give them the same
name as the agent instance. These references can be changed later on, pointing to a new instance,
in which case the old name can remain and cause some confusion. However, there are no
functional problems with doing so.

ActionAffector
CONTEXT or SPECIFIC

TriggerAffector
ANY or CONTEXT or SPECIFIC

Agent commands
Only works on script players with a few exceptions like AGENT Die, Remove, Heal or Hurt.

AGENT_Die
Instantly kills all the listed agents displaying a damage effect of the specified type. Agents must
have been created when this command is run, or it will have no effect on the agents once they
spawn.
--AgentRefList myAgents
Under this attribute, list all specific agents that are supposed to die.
--Action Affector myAffector
This attribute controls whether the effect should affect the agents listed under myAgents, or agents
stored in the current CONTEXT.
--DamageType myDamageType The type of damage used.

AGENT_EnterBuilding
Tells the a list of agents to enter a specified building (only enterable buildings are listed)
--AgentRefiList myAgents
--XProplnstanc e* myBuilding
--ActionAffector myAffector
--Quadrant myEntryQuadrant

AGENT_EnterContainer
Tells a list of agents to enter another agent that is enterable (all agents will be listed including non
enterable agents). Examples of enterable agents are turrets, radar agents, APCs and engineer
vehicles.Giving an enter order into a non-enterable agent will have no effect.

AGENT_ExitBuilding
Tells an agent to exit the building he is currently occupying

AGENT_ExitContainer
Not tested.
Tells the specified agent to exit the container (APC, Turret) he is currently occupying.

AGENT_Heal
Gives a number of health points to a list of agents. Each agent will be given the same amount of
new health. This command can be used on any agent.

AGENT_Hurt
Removes a number of health points from a list of agents. This command can be used on any agent.
AGENT_MoveTo
Issues a move command to all scripted agents listed. The move command will be targeted at the
centre of the area specified. It is not recommended to give such an order to more than a few units
at once as they will circle around it, trying to get into the center position.

AGENT_Remove
Removes all agents listed from the game without triggering a kill. TRIGGER_AgentsWereKilled will
not start by this command and no score changes will be generated for the removed units.

AGENT_Secondary
Not implemented.
Should have been used to switch the listed agents to their secondary mode.

AGENT_SetEnabled
Not implemented. Should have been used to switch the agent specified between a standard and a
nonresponsive mode in which it did nothing.

AGENT_SetFireBehaviour
Sets the fire behaviour for a list of agents to Free Fire, Hold Fire or Return Fire. This command has
an unreliable effect on player agents - their behavior will be changed, but it will not be reflected in
the user's GUI. Please do not use for player units.

AGENT_SetIndestructable
Not implemented. Was planned to make the affected agents indestructible for a period of time.
Instead, please spawn a INVINCIBLE barrel agent from the agent list, give it to the relevant player
and remove it when you want to return the player to mortality.

AGENT_SetMoveBehaviour
Not used. Sets the move behaviour for a list of agents between Follow Target and Hold
Position.

Campaign flags
Despite the name, campaign flags are only persisted throughout a mission including saves.
They do not carry over between missions due to a conflict with how savegames work.

DATA_ChangelntCampaignFlag
Modifies the specified integer campaign flag with a positive or negative number. For example,
using I as the amount will increase the value by one. Using -2 as the amount will decrease
the value by two.

DATA – RemoveCampaignFlag
Removes a campaign flag. The campaign flag will no longer be set.

DATA_SetIntCampaignFlag
Sets a campaign flag to a number. The flag will be created and will become set to the value
specified. Please note that setting an integer campaign flag to 0 (zero) will still mean that it is
set.

DATA_SetStrCampaign Flag
Sets a string campaign flag to the specified text content.

DEBUG_DebugText
Outputs a text string to the debug file. Useful for finding out if a specific script was started, or
for adding credits to a map.

GROUP_AgentGroup
With this you are able to define a list of agents that you later can use as a reference. You
only have to make the reference to the agent group. The group has no impact on the game,
but can be very useful in scripting, as you can now send orders, set triggers or use script
commands affecting the group as a whole instead of adding the individual units every time.
GUI _HeIpEnabIeWidget
Shows a flashing tutorial GUI (Graphical User Interface) component in the in game GUI. The
Widget name must exist in the HeIpScreen tree in the guis -ingame.juice file. These are
usually just blinking boxes overlapping the user interface, for example Slot] through SIot9 for
the order palette. Widget names are case sensitive.

GUI _HelpDisabIeAll
A special GUI command only used in tutorials. Hides all flashing tutorial GUI components.

Objectives
W hen given to a human player the short description will appear on the left side of the in-game
screen. The long description is used for more extensive information that will only appear
when the player views the objective screen. The Al believes he will win when he completes
all of his objectives.

OBJ_AddObjective _Annihilate
Not used. Was used to tell the AI to dominate the entire map, killing all opposition in the most
aggressive way possible.

OBJ_AddObjective _DefendArea
Al command that tells an A1 to guard an area on the map. The AI only uses the centre of the
specified area, so the size of this area doesn’t matter. Specifying this in the middle of
a bunch of turrets will motivate the A1 into using these turrets, if there is no other objective
nearby.

OBJ_AddObjective_DefendUnit
Do not use. Very special purpose objective only used on one mission in the GC2 campaign,
Makes the AI defend an immobile agent. The defended agent must be added in scripts prior
to this objective. May cause crashes on other maps.

OBJ_AddObjective _HumanObjective
An objective only used for Human players. Displays text for the player.

OBJ_AddObjective _SearchAndDestroy
Special objective for the Al will search / patrol the list of areas, When he finds an enemy he
will attack at all costs. It is necessary for the areas to be connected.

OBJ_AddObjective _Zone
Standard A1 objective that tells the Al to capture / defend the specified VL or LZ. The zone
must be added in scripts prior to this objective.

OBJ_ChangeObjectivelmportance
Changes the importance for an existing AI objective. The higher number the more important.
This is actually a multiplier of the AI's own calculated value for each objective. Changing it
during a mission can be a good way to divert the AI's attention.

OBJ_ObjectiveCompleted
Completes an existing objective, recommended for use only on human players. The objective
will be marked complete in the player's objective screen, but will remain there.

OBJ_ObjectiveFailed
Fails an existing objective, recommended for use only on human players. The objective will
be marked failed in the player's objective screen.

OBJ_RemoveObjective
Removes an objective for a Human or AI player. This is the only correct way to remove an objective
for an AI player. The objective will no longer be on the human player's list of objectives.
that LZ. The time in seconds will be used for how long the transition will take.

PLAYER_AddAgent
Adds an agent instance to the game, the generated name of this scriptcommand instance can be
used later when you need a reference to that particular unit. Is automatically added whenever an
agent is placed in Xed.

PLAYER_AlAddAgent
Similar to the above scriptcommand only this forces an agent instance to an AI objective. The agent
will be stuck with it until the objective is removed or the agent dies. After adding an agent instance
you will have to remove the addagent script and then add an aiAddagent script instead and use the
previous reference.

PLAYER_AlChangeDecisionTree
Forces the A1 to switch buy tree that is resident in its brain file. The inputted name should be the
same as the top node of that tree.

PLAYER_AlChangeEngageSuccessProbability
This modifies the EngageSuccessProbabilty value that also exists in the AI brainfile. A low value
will make the AI throw its units at its enemies, while a large number will make the AI gather its units
in larger groups before attacking, giving it a greater chance of success.

PLAYER_AlRemoveZone
Removes an existing VL or LZ from an A1 player. The AI will have no knowledge of this zone, but it
is still able to accidentely capture a zone while moving over it.

PLAYER_ChangeAgentsOwner
Sets the owning Player of a list of agents. (Turrets, will revert back to NOPLAYER)

PLAYER_Freezelnput
Only Works on A1 players, the A1 gives no further orders until unfreezed, but orders that are
already in issued will continue to be in effect. (TRUE = freeze, FALSE = unfreeze). In the start of
missions it is recommended to freeze the A1, give objectives and then assign units to the different
objectives and then unfreeze the AI.

PLAYER_MoveCarneraToLZ
If the player owns a LZ the camera will travel from its current location to the camera location that is
bound to

PLAYER_PlaySound
Will play a sound for a player. The path used has its root in the sound folder.

RANDOM_ActivateScript
Executes a random script from a weighted list of scripts. The probability for each script is
normalized and weighted against the probabilities for other scripts. Given the scripts A, B and C
with probability I for each of them will make them all as probable to start. Giving the A=1, B=2 and
C=3 will make C occur half the time, and three times more likely than A.

SCRIPT_ActivateScript
Runs a script instantly, inside the current script. Using this command, a script could start two other
scripts after one another, and still have triggers or commands afterwards that affect objects inside
those other scripts. For example, if we inside the script START use ActivateScript to start UNITS
and then TRIGGERS, the scripting inside TRIGGERS could affect agents inside the UNITS script.

SCRIPT_AddSound
Automatically added each time sound instance is placed in the 3d view of Xed. The name given to
this script is the name used to remove the sound later.

SCRIPT_EndMission
Not used, but it works. Closes down the mission and returns the player to the menus.

SCRIPT_EvaluationBranch
Sets up a condition and runs one script if the condition becomes true or another script if false. The
conditions that are available vary from comparing campaign flags and checking if triggers have
been triggered.

SCRIPT_KillTriggers
Kills a list of triggers. It is not recommended to kill the trigger from the script that the trigger points
towards. This is like sawing off the tree limb you are sitting on.

SCRIPT_RandomAddZone
A special command for randomizing zones. The zones must already exist in a script that must not
be started by any other command. Only the myTeam ownership of each zone is randomized
between the teams available on the map.

SCRIPT_RemoveSound
Removes a sound instance added earlier by SCRIPT_AddSound. Removing a sound that has not
yet been added can cause unexpected behavior.

SCRIPT_SetGameOverTie
Not used.
Unknown if it works. It was intended to end the mission without announcing a winner.

SCRIPT_SlowMotion
Not implemented.

SCRIPT_SucceedMission
Sets the winning Team, The other Teams will automatically get the mission-failed screen

TEAM _AddMinimapMarker
Adds a marker in the in-game minimap. Uses an area for location and scales the marker depending
on the size of that area. Flashes the number of times specified.

TEAM _AddZone
Adds a zone, which could be either a Victory Location (VL) or a Landing Zone (LZ).
--myZoneMarker
The zone uses a "thing" for the representation in the 3d world. This thing will show different colors
depending on if the zone is neutral or belongs to a player.
Vl, thing, LZ thing and LZ-UC thing are normally used. Others could work.
--myArea
The area used for the location and size of the zone. Normally 47 distance units in radius, or at least
as big as the marker, but sometimes big enough to represent the tactically important area.
--myBase Position
An area for the base position of the drop ship that will land on the zone. Standard is to place this
1000 units away from the zone, and at least 500 units outside the visible playfield.
--myCamera
A Camera position overlooking the zone should be added. This is the camera you can snap to using
the W key ingame.
--myStartingTeam
The starting team. This can be TEAM NOTEAM for a neutral zone, but not TEAM ANY.
--myisCapturableFlag if this is set to FALSE the zone cannot automatically change team from its
starting team. Use for LZNA and for zones intended to change ownership through script commands.
--mylsLandableFlag
If this flag is set to TRUE the zone acts as a Landing Zone (LZ), VLs should be set to FALSE. –
myCaptureAPAward. Each time the zone is captured by a team, a sum of AP can be given to that
team.
--myTimedApAward
This is the amount of AP that the zone will yield each time the myApAwardIntervals InSeconds
timer reaches zero.
--myApAwardlntervaIsInSeconds
A looping timer that gives myTimedApAward to the team that owns the zone.
--myTimeToCaptureInSeconds
The time it takes for the zone to change from neutral to the TEAM that currently occupies the zone.
--myTimeToLooselnSeconds
The time it takes for the zone to change from a TEAM to neutral, when the zone is occupied by
enemy units.
--myCautionFactor
A special A1 variable that affects how the A1 units that currently has this zone as their objective will
behave. A low value will make the units suicidal and a high value (max 1) will make the units use
their default behaviour.
--myMinimaplconFile
The marker that will be seen in the minimap. Use ui/skins/vl.dds for VLs, ui/skins/Iz.dds for LZs
and ui/skins/Izna.dds for uncapturable landing zones.
--myCaptureSound
The sound played when your team captures the zone.
--myLostSound
The sound played when your team loses control of the zone.
--mySomeoneCapturedltSound
The sound played when someone else captured the zone.
--myAboutToLooseSound
The sound played when, well.. I have no idea.

TEAM _ApAwardOrPenalty
Gives or takes an amount of AP from a team. Use positive values to give and negative values to
take.

TEAM _CameraPositionTrackAgent
Not used, but it works. The camera's position will be locked to a certain spot and will look directly at
the agent specified. Creates a 'security cam' perspective on the game. Use RestoreCameraPosition
or a short CameraSpline to restore control to the player.

TEAM _CameraShake
Shakes the camera, values above I causes extreme shaking due to a misunderstanding redarding
the representation of percentual values. Some people would expect 1 to mean I%, others expect 1
% to be 0.01 --really an easy mistake.

TEAM _CameraSpline
Creates a spline that the camera traverses using a list of timed waypoints.

TEAM _ChangeSoundtrack
Plays a soundtrack for all players in the same team

TEAM_ChangeZoneOwner
Not used. Changes the owning team of a zone. Could be used for objective-based changing of
zone ownership.

TEAM _FadeToColor
The screen fades from the current camera view to a one-colored screen, using the timer. Or the
other way around.

TEAM _FlashPositionlnMinimap
Flashes a marker in the in-game minimap. Uses an area for location and scales the marker
depending on the size of that area. Flashes the number of times specified.
other. The script command TEAM-PurgeMessageQue will empty this queue. The trigger
TRIGGER -Message BoxClosed will fire when a specific instance of the below message box types
has been closed.

TEAM_ForceTopDown Camera
Switches between standard rts camera and the Ground Control 1 camera. True = standard rts
TEAM _PIaySound
Plays a sound that is heard globally for all players on that team

TEAM _RemoveMinimapMarker
Removes a minimap marker

TEAM_RestoreCameraPosition
Restores the camera view that previously was saved by TEAM SaveCameraPosition

TEAM_SaveCameraPosition
Saves the camera view for all players in a team.

TEAM_SetCameraOrientation
Uses the current camera position and only modifies the orientation that the camera should look at.
Transition time between the camera orientations can be specified.

TEAM_SetCameraPosition
Uses the current camera orientation and only modifies the position that the camera should move to.
Transition time between the camera positions can be specified.

TEAM_SetCameraWidescreen
Switches between wide screen mode and normal combat view. When in wide screen mode the
entire GUI will be hidden so that no unit markers or even the mouse arrow will be visible.

TEAM_SetCameraView
Sets the camera to a previously saved camera position in xed. Both the cameras orientation and
position will be used. Transition time between the current view and the new view can be specified.

Messagebox e s
Shows a message box on the screen. A messagebox character and an audio file can be selected. If
several message boxes are triggered, they will be placed in a queue and will be played, and closed
one after the

TEAM _ShowAutomaticMessageBox
The message box will be visible for as long as the audio file is playing.

TEAM_ShowButton Message Box


The message box will be visible until the player clicks on the message box button. Use this to use a
button for skipping forward in scripting. Please note that this was never used in Ground Control 2:
Operation Exodus(tm) and so it might not work.

TEAM_ShowTimedMessageBox
The message box will be visible for the duration specified.
TEAM RemoveZone Removes a zone (a LZ or V L)

TEAM _PurgeMessageQue
Removes all message boxes that are playing and also those that has been triggered and are about
to be played. The corresponding audio will be silenced. Any triggers waiting for these message
boxes to be closed will not fire.

Things
A thing is based on a prop instance but has the ability to change state. A thing has no collision so
units can move through things.

THING_AddThingAdds a thing that has already been placed in the 3d view from the thing instance
list in xed. References to this thing can later be made from the name of this script.
THING_LookAtAgent
Not used, possibly not implemented. Probably rotates a thing so that it faces the agent specified.

THING_LookAtCamera
Not used, possibly not implemented. Probably rotates a thing so that it faces the player's camera, or
at a camera position.

THING_LookAtThing
Not used, possibly not implemented. Probably rotates a thing so that it faces toward another thing
specified.

THING_MoveTo
Not used, possibly not implemented. Teleports a THING AddThing instance to a new location area.

THING_RemoveThing
Removes an added thing.

THING_SetAnimationState
Sets the animation state of an added thing. Frequently used four-letter states a^e: STND, WALK,
FIRE, normally for passive, active and death.

THING_SetPlayerColor
Not used. Could be used to change the color of a spawned thing to that of a certain player, much like
the landing zone and victory location markers change colors with ownership.

Triggers
Most triggers will run a script after a condition has been met. Some of the triggers have a flag that
functions as an AND / OR flag for the different conditions. Either all conditions in the trigger must be
true or only one needs to be true. If an agent in the list dies or is removed the trigger only requires the
agents that are left to make the trigger happen except when there is only one agent left. When he
dies/removed the trigger will not happen, unless it's an agentWasKilled trigger.

TRIGGER_AgentsEnterArea
Triggers a script when a list of agents has entered an area. The trigger can be set to wait for all the
listed agents or only one agent.

TRIGGER_AgentsEnterBuilding
Triggers a script when a list of agents has entered a building. The name of the agent type must be
exactly the same as in the agent instance list in XEd.

TRIGGER_AgentsEnterContainer
Triggers a script when a list of agents has entered a container (enterable agent).
Not Used

TRIGGER_AgentsExitBuilding
Not used

TRIGGER_AgentsExitContainer
Not used

TRIGGER_AgentsHaveKilled
Triggers a script when the listed agents have killed an agent.

TRIGGER_AgentsLeaveArea
Triggers a script when a list of agents has leaved an area. The agents must be inside the area when
the trigger is set upped.

TRIGGER_AgentsUnderAttack
Triggers a script when a list of agents has been attacked by gunfire.

TRIGGER_AgentsWereKilled
Triggers a script when a list of agents had died.

TRIGGER_AgentTypeEnterArea
Triggers a script when an agent type has entered an area. The name of the agent type must be
exactly the same as in the agent instance list in XEd.

TRIGGER_AgentTypeEnterBuilding
Triggers a script when an agent type has entered a building. The name of the agent type must be
exactly the same as in the agent instance list in Xed.

TRIGGER_AgentTypeEnterContainer
Triggers a script when an agent type has entered a container (enterable agent) The name of the
agent type must be exactly the same as in the agent instance list in Xed.

TRIGGER_AgentTypeExitBuilding.
Not used

TRIGGER_AgentTypeExitContainer
Not used

TRIGGER_AgentTypeHaveKilled
Triggers a script when an agent type has killed an agent. The name of the agent type must be exactly
the same as in the agent instance list in Xed.

TRIGGER_AgentTypeLeaveArea
Triggers a script when an agent type has leaved an area. The name of the agent type must be exactly
the same as in the agent instance list in Xed.

TRIGGER_AgentTypeUnderAttack
Triggers a script when an agent type has been attacked by gunfire. The name of the agent type must
be exactly the same as in the agent instance list in Xed.

TRIGGER_AgentTypeWasKilled
Triggers a script when an agent type has died. The name of the agent type must be exactly the same
as in the agent instance list in Xed.

TRIGGER_Al1PIayersReady
This trigger waits for all players to be connected to a game before it runs a script. Useful to have
when starting missions.

TRIGGER_AnyOtherPlayerEntersArea
Not used

TRIGGER_AnyOtherTeamEnterArea
Not used

TRIGGER_CampaignFIagNotSet
Triggers a script if the specified campaign flag has not Waits for the timer has reach zero then
runs a script been set.

TRIGGER_CampaignFIagSet
Triggers a script when a number of listed triggers has Triggers a script if the specified campaign
flag has triggered. been set

TRIGGER_ConditionBranch
Sets up one or more options. Only one of these options will execute its script when all of its
conditions have been met.
TRIGGER_GameOver
Not used

TRIGGER_MessageBoxClosed
Triggers a script when a specified message box has been closed

TRIGGER_NumberOfZonesTakenByTeam
Triggers a script when a team is in control of a specified number of zones (V L’s or
LZ’s)

TRIGGER_PlayerAction
Special trigger used in the tutorials. It triggers on different inputs from the player.

TRIGGER_PlayerConnected
Triggers a script as sooo as a player has connected.

TRIGGER_PlayerEnterArea
Triggers a script when the player enters an area with one of his units.

TRIGGER_PlayerEnterBuilding
Not used

TRIGGER_PlayerEnterContainer
Not used

TRIGGER_PlayerExitBuilding
Not used

TRIGGER_PlayerExitContainer
Not used

TRIGGER_PlayerHaveKilled
Not used

TRIGGER_PlayerLeaveArea
Not used

TRIGGER_PlayerUnderAttack
Triggers a script when a unit of a player has been attacked by gunfire.

TRIGGER_Timer
Waits for the timer has reach zero then runs a script.

TRIGGER_TriggerlsTriggered
Trigger a script when a number of listed triggers has triggered.

TRIGGER_ZonesTakenByTeam
Triggers a script when a team is controlling a list of zones (VL’s or LZ’s) The trigger
can be made to trigger if only one or all zones is controlled.

TRIGGER_ZoneTakenByPlayer
Triggers a script when a player captures the zone (VL or LZ)

Weather
WEATHER_SetWeatherEffect
Changes the weather. Some weathers require a transition time of 10 seconds before changing the
weather again.

You might also like