|
|
Main /
Triggered Script ReferenceTriggeredScriptReferenceThis reference guide describes some of the most useful functions and keywords you can use in your TriggeredScript classes. NOTE: This is *NOT* a complete list of the TriggeredScript functions. To see a complete list, open the gbxScripted\Classes\TriggeredScript.uc file in a text editor and browse through the code contained therein. Reading the ReferenceEach function is specified according to the following format.
You can find the function name easily because it is always followed //immediately// by an open parenthesis (. If the function returns a value, the type of this value is specified immediately after the function keyword. Parameters are of the following form:
The most important parts here are the type (usually string, name, float, int or similar) and the parameter name which tells you something about what the parameter means. If a parameter is marked optional you can leave it off entirely. A default value will be used. If a parameter is marked out it might be changed by the function. This is an advanced concept and is explained elsewhere. You can generally ignore this keyword. If a parameter is marked coerce you can pass anything into this parameter and it will be treated like the specified type. You can safely ignore this keyword. ACTION-style FunctionsGeneral Actions
Executes the string command as a console command.
Destroys the actor with the given actorTag. If more than one actor has this tag, only the first actor found will be destroyed.
Teleports the first actor with the tag ActorToMoveTag to have the same location and rotation as the first actor with the tag DestinationTag.
Creates and returns an actor with the given ClassName and assigns this new actor with the tag TagName.
Causes the first actor with the tag actorTag to play the ambient sound soundName with the given volume, pitch, and radius parameters.
Causes the first actor with the tag actorTag to play the sound soundName with the given volume, pitch, and radius parameters.
Changes to the map specified by URL.
Sets the physics of the first actor with the tag actorTag to the indicated physics modes. This is an advanced function: you should know what the physics modes are and how to control them before using this function.
Hides or unhides the specified actor.
Assigns the indicated pawn to the indicated unit. Automatically removes him from his prior unit if any. Specify unitTag as 'None' to make the pawn assigned to no unit.
optional bool bCentered, optional bool bClearSubTitles )
TODO Notes
TODO Notes
TODO Notes
This is a latent function, meaning that when executed from state code this function will not return immediately but will "sleep" until its condition is fulfilled. In the case of ACTION_WaitForEvent(), the function will return when the specified event is triggered.
name pawnTag,
name BaseAnim,
float BlendInTime,
float AnimRate,
optional bool bLoopAnim,
optional float StartFrame )
Causes the indicated pawn to play the indicated animation. The pawn must be possessed by a ScriptedController (not a Mind).
Changes the controller of the pawn specified by pawnTag to a new instance of the controller class aControllerClass. This will occur even if the pawn's previous controller is already an instance of aControllerClass. For example:
Will give the pawn with tag 'jimmydean' a new Mind. Unit Order Actions
Tells the unit with the specified unitTag to travel to the location of the actor with the given destinationTag.
Tells the unit with the specified unitTag to prioritize its fire toward the enemy target with the given targetUnitTag.
Tells the specified unit to fall in. Only works for units with a SuperUnit (defined by Unit.SuperUnitName).
Tells the specified unit to fall out. This does not change the unit's formation center, but subsequent move orders given to this unit will cause them to move in a detached manner from their super unit. Pawn Control ActionsTODO These are not reliable currently because AI always overrides scripted control of Pawns. This will change soon.
Forces the pawn to walk, as opposed to crouch or run.
Forces the pawn to crouch, as opposed to walk or run.
Forces the pawn to run, as opposed to walk or crouch.
Totally freezes the pawn. It will not animated or move at all. Flow-control Functions
Jumps to the Label in the same state.
Shifts execution to the specified NewState. By default, the new state begins executing at its 'Begin' label, but you can override this by specifying the optional 'Label' name parameter. Mathematical FunctionsThe functions are useful for intermediate and advanced scripters. Integer Functions
Returns the smaller of A or B.
Returns the larger of A or B.
Returns V, unless V is less than A, in which case this returns A, or is larger than B, in which case this returns B. Floating-point Functions
Like Min() but for floating-point numbers.
Like Max() but for floating-point numbers.
Like Clamp() but for floating-point numbers. Randomization Functions
Returns a pseudorandom floating point number in the range (0,1]. (This function will never actually return 1.0.)
Returns a pseudorandom integer in the range (0, Max]. The largest number that this function will return is Max - 1.
Returns true with a likelihood of percentageChanceTrue. For instance, calling 'IsRandomlyTrue( 50.0 )' would return true 50% of the time and false 50% of the time. Calling 'IsRandomlyTrue( 25.0 )' would return true 25% of the time and false 75% of the time.
Returns a pseudorandom number in the range (Min, Max]. Will never actually return Max. Miscellaneous Functions
Writes the given string to the Unreal log window. |