Actions
To learn how to use these actions, take a look at the AIScript documentation page. If the action name begins with the word If, then the action is considered a conditional action, which is discussed in the AIScript documentation.
MACTION_AddAnimatedHUDTexture
Very similar to MACTION_AddHUDTexture, but instead of simply overlaying textures, it does this, plus animates them. If done correctly, this can allow for complex notifications or camera effects.
Variables
ManageType - Whether to start or stop all animations from playing
AnimationActions.Frames - Each texture (frame) that will be used for the animation
AnimationActions.OriginType - The type of origin or pivot the texture should be placed with
AnimationActions.fFrameRate - The frame rate of the animation. Example: AnimationActions.fFrameRate=30.0 will cycle through 30 frames each second
AnimationActions.bDestroyOnEnd - If true, once the animation has run out of frames to cycle through, the animation will finish. If false, the animation will instead loop until this action is run again that specifies that all animations should stop playing
AnimationActions.bFillScreen - If true, the textures fill the whole screen instead
bHideDuringCutscene - If true, all animations will be hidden (but still animating) while a cutscene plays
MACTION_AddHUDTexture
Allows you to overlay an array of textures onto the screen. This can allow for simple notifications or camera effects. If you want to animate textures instead, use MACTION_AddAnimatedHUDTexture. MACTION_AddHUDTexture and MACTION_AddAnimatedHUDTexture are not compatible! Make sure you only use one at a time, since they both use the same HUD element at the current moment.
To get started, provide a texture to overlay in TextureActions.Texture, then specify where on the screen this texture should display at by assigning TextureActions.OriginType. You can overlay as many textures as you want, and can also remove specific textures by changing the ManageType and then adding textures to TextureActions.Texture to specify which textures should be removed.
Variables
ManageType - How should the overlaid textures be managed
TextureActions.Texture - The texture to overlay
TextureActions.OriginType - The type of origin or pivot the texture should be placed with
TextureActions.bFillScreen - If true, the texture fills the whole screen instead
bHideDuringCutscene - If true, all overlaid textures will be hidden while a cutscene plays
MACTION_AddNotify
Adds a notify to a given pawn, allowing for tying event calls localized within the pawn class itself to be fired, when certain parts of certain animations of the pawn are played. This means that you can essentially add an event to an animation playing on the current pawn.
The game natively uses this function on pawns which need the ability to run code specifically when a part of a certain animation is played by the pawn. In order to use this action properly, you'll need to have some knowledge of how the game handles functions in actors. If you don't know how this works, you likely shouldn't mess with this. This action is most helpful when you have directly modified the code of a certain pawn, but can also be used on existing pawns to add some new logic, provided that the function you want already exists within the pawn.
Notice: Adding a notify is PERMANENT until the game is closed!
Variables
AddNotifyActions.PawnClass - What pawn class to locate
AddNotifyActions.PawnTag - What pawn tag to locate
AddNotifyActions.nAnimSequence - What animation sequence for this pawn should be looked at? An animation sequence is essentially the name of the animation. You can check the names of certain animations in the level editor
AddNotifyActions.fFrame - What frame of the animation sequence needs to be reached, before the notify is fired
AddNotifyActions.nFunctionToRun - What function/event should be fired to, upon the notify being activated? This must a function that does not take required arguments. If it has required arguments, it will simply not work
Keywords
AddNotifyActions.PawnTag='CurrentPlayer' - Targets the current player
MACTION_Announce
The all-in-one action for announcing text onto the screen. Announcing text onto the screen will appear as centered text shown on the center of the game's screen. Text can also represent some sort of data from an actor in the current map via a ReplacePhrase.
Variables
AnnounceActions.sComment - The comment/message to announce onto the center of the screen. Don't provide too much text, or else the full message may not fully show on the center of the screen
AnnounceActions.bReplacePhraseWithTransferProp - Whether the replacement phrase below should be replaced with the value pulled from TransferProp. If you know how a TransferProp works, then you should be able to understand how this works. Check out MACTION_SetProp to learn more
AnnounceActions.ReplacePhraseActions - What actions should be done in terms of replacing phrases with TransferProps? You should only mess with this if you set bReplacePhraseWithTransferProp=true
AnnounceActions.ReplacePhraseActions.sReplacePhrase - What phrase to look for and to replace. This phrase should be a distinct set of characters in your original comment/message for the announcement, such as %s
AnnounceActions.ReplacePhraseActions.TransferProp.GetActorClass - What actor class to locate
AnnounceActions.ReplacePhraseActions.TransferProp.GetActorTag - What actor tag to locate
AnnounceActions.ReplacePhraseActions.TransferProp.GetVariable - What actor variable to get
AnnounceActions.AnnouncementSettings.fAnnTime - The amount of seconds the announcement will appear onscreen for
AnnounceActions.AnnouncementSettings.AnnColor - The text color for the announcement
MACTION_AttachPawnToBone
Attaches a provided pawn to a provided pawn's bone, or detaches it depending on the options picked. A pawn only has a bone if it is being displayed via a Mesh (you can check whether it is by checking its property window and checking the DrawType in the Display tab).
To check what the name of the bone that you want to attach to is named, you'll need to open up the level editor, then open the animation browser, then locate your mesh. Once you've found your mesh, click the icon at the top left corner of the browser that is right of the blue box icon. Then, once you clicked that, click the next button right of that one. If you did this correctly, you should be able to see the names of every bone.
Variables
AttachActions.PawnClass - (The pawn for attachment) What pawn class to locate
AttachActions.PawnTag - (The pawn for attachment) What pawn tag to locate
AttachActions.AttachingPawnClass - (The pawn for getting attached) What pawn class to locate
AttachActions.AttachingPawnTag - (The pawn for getting attached) What pawn tag to locate
AttachActions.nBoneName - The name of the bone to attach to PawnTag. Read above to learn how to find this
AttachActions.vBoneOffsetLoc - The relative location offset to apply to AttachingPawnTag
AttachActions.rBoneOffsetRot - The relative rotation offset to apply to AttachingPawnTag
AttachActions.bDetachPawn - If true, detaches AttachingPawnTag from PawnTag
Keywords
AttachActions.PawnTag='CurrentPlayer' - Targets the current player
MACTION_BouncePawnTo
Bounces a pawn to a specified point, just like how a bounce pad would.
Variables
PawnClass - (The pawn to be bounced) What pawn class to locate
PawnTag - (The pawn to be bounced) What pawn tag to locate
TargetActorClass - (The actor to bounce to) What actor class to locate
TargetActorTag - (The actor to bounce to) What actor tag to locate
fTimeToHitTarget - How long in seconds should the bounce take
bCanMoveWhileJumping - If true, the pawn can move while in the middle of being bounced to the target
BounceSound - If provided a sound, what sound should play when the pawn is bounced
vTargetOffset - The locational offset to apply to the bounce target
fBounceSoundVolume - The volume that the bounce sound should play at
Keywords
PawnTag or TargetActorTag='CurrentPlayer' - Targets the current player
MACTION_CameraFlyTo
Emulates FlyTo and/or TargetFlyTo from CutScript. Comes with all original customization, plus more!
Most options have 2 values that can be given. Value 1 is for FlyTo, and value 2 is for TargetFlyTo. This allows you to configure both a FlyTo and a TargetFlyTo within the same action.
It's not recommended to use this in order to make an elaborate camera movement happen; you should always use CutScript for complex camera movements.
Variables
CameraAction - Whether the camera should FlyTo, TargetFlyTo, or both. This will make sense if you've learned CutScript
FlyToActorClass - (The actor to fly) What actor class to locate
FlyToTag - (The actor to fly) What actor tag to locate
TargetFlyToActorClass - (The actor to turn to) What actor class to locate
TargetFlyToTag - (The actor to turn to) What actor tag to locate
MoveType - The easing type the camera should use when moving or turning
fMoveTime - How long the camera should take to move in seconds
vDestOffset - An offset value to the the camera destination
rRotStep - An offset value to the the camera's rotation
bTurnWithChar - If true, the camera will turn relative to the destination actor
bRelativeToChar - If true, the camera will move relative to the destination actor
bStayLockedToActor - If true, the camera will stay locked onto the actor
SplineActorClass - (The optional spline) What spline actor class to locate
SplinePointTag - (The optional spline) What spline tag to locate
bCalcTimeFromSpeed - If true, fMoveTime will be generated by a speed factor value, which makes it so that the camera takes longer or shorter to move to its destination, based on how far it currently is
fSpeedFactor - If bCalcTimeFromSpeed=true, how fast should the camera move
bDisablePlayerMovement - If true, while this action is active, the player will be unable to control their movement
fHoldTime - How long should the action hold in place after a FlyTo or TargetFlyTo is finished, before the action is finished
fGoHomeTime - How long should it take for the camera to go home after the action finishes? The camera going home is referring to the camera flying back to the current player's perspective
bToggleCinematicBars - If true, the cinematic black bars that are used in cutscenes will appear for the duration of the action. This does not include the time that the camera goes home
Keywords
FlyToTag or TargetFlyToTag='CurrentPlayer' - Targets the current player
MACTION_ChangeCondition
Takes a specified condition and sets its condition to either true or false. Also comes with the option to toggle the condition if you need that instead.
Variables
bNewCondition - What new condition value should be assigned
TriggeredConditionTag - The condition's tag to locate
bToggleInstead - If true, toggles the condition instead
MACTION_ChangeLevel
An all-in-one action that provides the best way to change to a different level. Can customize whether the loading image shows, what the new game state should be, whether to fade the screen out (as well as what color, fade time, etc.), whether to fade out the music, whether to travel the inventory and how long it should take before a level transition actually occurs.
Variables
NextLevelName - The level to change to
bShowLoadingImage - If true, shows the LOADING image onscreen when the level transition begins. Setting this to false will result in the LOADING text permanently not appearing until the game is reset
bSetGameState - If true, makes NewGameState become the new game state
NewGameState - Which game state to change to
bFadeScreen - If true, fades the screen with the settings provided
FadeSettings.ScreenColor - The color to fade the screen to
FadeSettings.fFadeTime - How long should the fade take in seconds
FadeSettings.FadeType - What fade type to use
FadeSettings.bFlash - Whether to flash the fade or not
bFadeOutMusic - If true, fades out the music at the same rate as fLevelTransitionTime
bTravelInventory - If true, makes the current player's inventory travel across levels (makes the amount of coins and potions the player had persist)
fLevelTransitionTime - How long the level transition should take in seconds (before actually changing the level)
MACTION_ChangeRunSpeed
A simple action that allows you to change the run speed of a given pawn. The reason this is helpful is because the game has a hacky method of modifying a pawn's run speed, so this simplifies that process of changing the pawn's run speed massively. Simply provide a pawn and the new run speed to change the pawns running speed!
Variables
ChangeRunSpeedActions.PawnClass - What pawn class to locate
ChangeRunSpeedActions.PawnTag - What pawn tag to locate
ChangeRunSpeedActions.fNewRunSpeed - The new run speed value the pawn should use. The default value for this is typically 550.0 for all playable characters, except for PIB who has a run speed of 375.0
ChangeRunSpeedActions.bAddRunSpeedInstead - If true, takes the value of ChangeRunSpeedActions.fNewRunSpeed and adds it to the pawn's run speed instead of setting it
ChangeRunSpeedActions.bDefaultRunSpeedInstead - If true, sets the pawn's run speed back to the default amount
Keywords
ChangeRunSpeedActions.PawnTag='CurrentPlayer' - Targets the current player
MACTION_ChangeSkin
Changes the skin of a provided actor to something else. By changing the skin of an actor, you change the textures that it references when the actor displays its textures. You can optionally change the skin back to its default, if you wish to undo any skin changes you've made.
Variables
ChangeSkinActions.ActorClass - What actor class to locate
ChangeSkinActions.ActorTag - What actor tag to locate
ChangeSkinActions.NewSkins - The array of new skins that should be used instead
ChangeSkinActions.bUseDefaultSkins - If true, changes the skin of the actor to the default skin
Keywords
ChangeSkinActions.ActorTag='CurrentPlayer' - Targets the current player
MACTION_ChangeState
Changes the state of a provided actor to something else.
Variables
ChangeStateActions.ActorClass - What actor class to locate
ChangeStateActions.ActorTag - What actor tag to locate
ChangeStateActions.nNewState - The new state the actor should change to
ChangeStateActions.bControllerContext - If true, changes the state of the controller controlling the pawn instead of the pawn
Keywords
ChangeStateActions.ActorTag='CurrentPlayer' - Targets the current player
MACTION_Debug
An essential action for any developmental work. This action is typically used for quickly announcing or logging text, and should not be used for officially-released projects. The text/comment supports replace phrases (done with TransferProp), which allows you to replace a phrase seen in the comment with data obtained from a TransferProp, which can be very helpful for debugging how certain aspects of a mod/map function more easily.
Variables
DebugType - The debug type to use
Comment - The comment/message
bReplacePhraseWithTransferProp - Whether the replacement phrase below should be replaced with the value pulled from TransferProp
ReplacePhraseActions.ReplacePhrase - What phrase to look for and to replace
ReplacePhraseActions.TransferProp.GetActorClass - What actor class to locate
ReplacePhraseActions.TransferProp.GetActorTag - What actor tag to locate
ReplacePhraseActions.TransferProp.GetVariable - What actor variable to locate
AnnouncementSettings.fAnnTime - The amount of seconds the announcement will be visible onscreen
AnnouncementSettings.AnnColor - The text color for the announcement
MACTION_DeleteSaveGame
Attempts to delete a save game. In the case that the game is currently playing off of that save game, then the Windows operating system will not allow the game to delete the save game.
Variables
SaveGamesToDelete - An array of save games that should be deleted
Keywords
SaveGamesToDelete(i)=-1 - Deletes the current save game that the player is running on
MACTION_DeliverLocalizedDialog
Plays a dialog from a pawn with automatic subtitles. Can be heavily customized.
Variables
PawnClass - What pawn class to locate
PawnTag - What pawn tag to locate
sDialogName - Which dialog to play. The name of the dialog is assumed to be the name of the sound file in AllDialog.uax, and will pull the subtitle from HpDialog.int while assuming the subtitle's key name is the same as the dialog name
bPlaySound - If true, plays the dialog sound
bNo3DSound - If true, the dialog sound will not be localized to the pawn
bModifiedBumpline - Set to true if AllDialog.uax is modified, in order to retain lipsyncing
fVolume - The volume of the dialog
bDontDisplaySubtitle - If true, subtitles will not be shown
Optional_fExplicitDisplayDuration - If changed, will set how long the subtitles should display in seconds
Optional_sSubtitleFileName - If provided, the subtitle will be assumed to be located in Optional_sSubtitleFileName, instead of HpDialog.int
Optional_sExplicitDialogString - If provided, the subtitle will be Optional_sExplicitDialogString. Specifying a subtitle manually will cause the dialog sound file to not play, meaning no dialog will be said
Optional_bUseExplicitSoundSlot - If true, the sound slot the dialog will play through will be set to Optional_SoundSlot
Optional_SoundSlot - If Optional_bUseExplicitSoundSlot=true, which sound slot to use
MACTION_DestroyActors
Locates the specified actors, then destroys them. The method in which they are destroyed can be configured.
Variables
DestroyActions.DestroyActorClass - The actor class to locate
DestroyActions.DestroyTag - The actor tag to locate
bPickRandom - If true, picks 1 random DestroyAction to run
bSoftDestroy - If true, if the actor is a KWPawn, then the pawn will only be destroyed once the current player's camera is no longer looking at the pawn
bSoftDestroy_Force - If true, and if bSoftDestroy=true, then even if bDespawnable=false on the actor, the actor will still be destroyed regardless
bOnlyDestroyFirst - Whether to only destroy the first found actor instead of all found actors
MACTION_DropCarryingActor
Finds the specified pawn, then drops the currently held actor (or instantly destroys if needed). This is used for when it's needed to force a pawn to drop an actor they're holding. Keep in mind that by doing this, you may cause the dropped actor to get stuck on top of the pawn's head, which could cause further issues.
Variables
PawnTag - What pawn tag to locate
bDestroy - If true, will destroy the held actor
Keywords
PawnTag='CurrentPlayer' - Targets the current player
MACTION_EnemyRunAway
Makes any specified enemies run away. This is typically used when a cutscene occurs in order to prevent certain enemies from interacting with the cutscene pawns.
Variables
bBanditsRunAway - If true, causes all bandits to run away
bPeasantsRunAway - If true, causes all peasants to run away
bElvesRunAway - If true, causes all elves to run away
bKnightsRunAway - If true, causes all knights to run away
bBatsFlyAway - If true, causes all bats to fly away
MACTION_FadeActor
Fades an actor to a new color and/or opacity. Can be given a fade time, fade type, a color and can be destroyed when done. To reset the fade values of an actor, set the color to (A=255,R=127,G=127,B=127).
Variables
FadeActorActions.ActorClass - What actor class to locate
FadeActorActions.ActorTag - What actor tag to locate
FadeActorActions.ActorColor - The color (and opacity) to fade to
FadeActorActions.fFadeTime - How long should the fade take in seconds
FadeActorActions.FadeType - What fade type to use
FadeActorActions.bDestroyOnFadeEnd - If true, destroys the actor when the fade finishes
FadeActorActions.bRandomizeColor - If true, randomizes the color
Keywords
FadeActorActions.ActorTag='CurrentPlayer' - Targets the current player
MACTION_FadeView
Fades the screen. Can be given a fade time, fade type, a color and can make it flash. To reset the fade values of the screen, set A=0 in ScreenColor.
Notice: any sort of screen fades can overwrite other screen fades (including cutscene fades). You should keep this in mind when considering whether or not you can actually do a screen fade without running into issues.
Variables
ScreenColor - The color (and opacity) to fade the screen to
fFadeTime - How long should the fade take in seconds
FadeType - What fade type to use
bFlash - If true, flashes the screen momentarily
bRandomizeColor - If true, randomizes the color
MACTION_FollowPawn
Makes a pawn start or stop following another pawn. A maximum of 2 pawns can follow a leader, but you can assign followers to followers.
Variables
FollowActions.LeaderClass - (The leading actor) What actor class to locate
FollowActions.LeaderFollowTag - (The leading actor) What actor tag to locate
FollowActions.FollowerClass - (The follower actor) What actor class to locate
FollowActions.FollowerTag - (The follower actor) What actor tag to locate
FollowActions.bStopFollowing - If true, makes the follower located stop following any pawns its currently following
bPickRandom - If true, picks 1 random FollowActions to run
Keywords
FollowActions.LeaderFollowTag='CurrentPlayer' -- Targets the current player
MACTION_ForceAction
Makes the specified pawn run a certain action. All actions follow game rules unless specified otherwise (they won't work if the typical conditions are not true). The only action types that require a pawn to be specified are those which are not considered global, such as a Cutscene Skip or a Pause Menu.
Variables
ActionType - Which type of action should be executed
GetPawnClass - (If needed) What pawn class to locate
GetPawnTag - (If needed) What pawn tag to locate
Keywords
GetPawnTag='CurrentPlayer' - Targets the current player
ActionType Exception List:
Single Jump - None
Double Jump - Always works, pawn must be a KWPawn
Punch - Only works on the current player, pawn must be a ShHeroPawn
Cutscene Skip - None
Movie Skip - Pulls up a potion menu if a movie isn't being skipped
Potion Menu - None
Pause Menu - None
MACTION_GotoMenu
Goes to a specified menu, or closes a menu. The menu name should be formatted as such: Package.Class (Example: KWGame.KWPageFrontEnd). In the ActionType variable, there are 2 options that look very similar, those being AT_CloseMenu and AT_CloseAllMenus. AT_CloseMenu closes the most recent menu, and AT_CloseAllMenus closes every currently-opened menu. This can be helpful if you're overlapping menus on top of each other. The other 3 variables provided in OpenMenuVars are additional native variables that can be provided, but they are, for the most part, un-helpful.
Variables
ActionType - What action type should be used
OpenMenuVars.MenuName - What menu will be opened
OpenMenuVars.bDisconnect - Whether or not opening the menu should exit all maps. Should never be used, but it's an option
OpenMenuVars.Msg1 - Optional parameter pass #1. Rarely used for certain GUIs. This is very similar to OnEvent()
OpenMenuVars.Msg2 - Optional parameter pass #2
MACTION_IfActorExists
Returns true if the specified actor exists in the current map and fits the ExistType condition.
Variables
ExistType - What type of existence should be used for the condition
ConditionValue - What value to compare against (depending on the exist type)
ActorClass - What actor class to locate
ActorTag - What actor tag to locate
ExistType Descriptions
ET_DOES_EXIST - Makes the condition whether ActorTag exists at all
ET_DO_MORE_THAN_X_EXIST - Makes the condition whether more than ConditionValue of ActorTag exists
ET_DOES_ONLY_X_AMOUNT_EXIST - Makes the condition whether there are exactly ConditionValue ActorTag
MACTION_IfActorInRange
Returns true if the specified actor is within range of another specified actor.
Variables
Actors.ActorClass - (Actors for comparison) What actor class to locate
Actors.ActorTag - (Actors for comparison) What actor tag to locate
ActorRangeCondition.ActorClass - (Actor to compare against) What actor class to locate
ActorRangeCondition.ActorTag - (Actor to compare against) What actor tag to locate
ActorRangeCondition.Radius - The maximum radius that any of the actors can be away from this conditional actor
ConditionType - What condition type should be used
ConditionAmount - (If the condition type requires this) How many of the actors should be in range of the specified actor
ConditionType Descriptions
CT_Any_Actors_In_Range - Makes the condition whether Actors.ActorTag is in range of any ActorRangeCondition.ActorTag
CT_All_Actors_In_Range - Makes the condition whether all Actors.ActorTag are in range of a ActorRangeCondition.ActorTag
CT_X_Amount_Of_Actors_In_Range - Makes the condition whether there are exactly ConditionAmount Actors.ActorTag in range of any ActorRangeCondition.ActorTag
CT_No_Actors_In_Range - Makes the condition whether Actors.ActorTag is not in range of any ActorRangeCondition.ActorTag
Keywords
ActorRangeCondition.ActorTag='CurrentPlayer' - Targets the current player
MACTION_IfActorTouching
Returns true if the specified actor is touching another specified actor.
Variables
Actors.ActorClass - (Actors for comparison) What actor class to locate
Actors.ActorTag - (Actors for comparison) What actor tag to locate
ActorTouchCondition.ActorClass - (Actor to compare against) What actor class to locate
ActorTouchCondition.ActorTag - (Actor to compare against) What actor tag to locate
ConditionType - What condition type should be used
ConditionAmount - (If the condition type requires this) How many of the actors should be touching the specified actor
ConditionType Descriptions
CT_Any_Actors_Touching - Makes the condition whether Actors.ActorTag is touching any ActorTouchCondition.ActorTag
CT_All_Actors_Touching - Makes the condition whether all Actors.ActorTag are touching a ActorTouchCondition.ActorTag
CT_X_Amount_Of_Actors_Touching - Makes the condition whether there are exactly ConditionAmount Actors.ActorTag touching any ActorTouchCondition.ActorTag
CT_No_Actors_Touching - Makes the condition whether Actors.ActorTag is not touching any ActorTouchCondition.ActorTag
Keywords
ActorTouchCondition.ActorTag='CurrentPlayer' - Targets the current player
MACTION_IfCanSeeActor
Returns true if an actor can currently be seen by the current player's camera.
Variables
ActorClass - What actor class to locate
ActorTag - What actor tag to locate
bTraceCheck - If true, then on top of the normal check, a trace between the current camera and the actor must not collide with anything
MACTION_IfComplexRandomPct
Similar to ACTION_IfRandomPct, but supports more than 2 outcomes and comes with weighted odds as an option. The method in which this action can allow for multiple outcomes is by having each random action number act like ACTION_GotoAction. No outcome will result in the action returning false due to the nature of this action, meaning there's no reason to add an ACTION_EndSection in the AIScript.
Variables
RandActionNums.ActionNum - Which action will be gone to, if randomly selected
RandActionNums.Weight - The weight/chance of the choice. Higher values are higher odds of being picked
bWeightedOdds - If true, the odds will be weighted in randomness, and RandActionNums.Weight must be provided
MACTION_IfCounter
Returns false until the action has been run iNumToCount times, at which point, will always return true. This action, in a way, emulates a Counter actor. In contrast with the original Counter, you can count beyond 255 times, can randomize the amount of times it counts and can (technically) reset the counter.
Variables
iNumToCount - The total amount of counts required in order to return with true
bUseRandValues - If true, gets a random value to determine what iNumToCount should equal
Rand_MinMaxValues - If bUseRandValues=true, the range of random values to use
bResetIfConditionTrue - If true, the counter will be reset if a TriggeredCondition's condition is true
TriggeredConditionTag - What TriggeredCondition tag to locate
bOnReset_RedoRandom - If bResetIfConditionTrue=true, bUseRandValues=true and if true, iNumToCount will be randomly calculated when the counter is reset
MACTION_IfCurrentLevelTime
Returns true if the amount of time passed in the current level has surpassed the amount of expected elapsed time (condition can optionally be inverted). It's important to mention that the level time value gets saved, so if you load a save, the level time value will go back to how much time had originally elapsed.
Variables
fExpectedTimeElapsed - How much time is expected to have elapsed (the condition for it)
bInvertCondition - If true, the condition is inverted
MACTION_IfCurrentMap
Returns true if the current map is expected.
Variables
ExpectedMapNames - What map names are expected
MACTION_IfCurrentMusic
Returns true if the game is currently playing an expected music track. If music is completely muted, then this will always return false, regardless if a music track would otherwise be playing.
Variables
ExpectedMusicTracks - Which music tracks are expected
MACTION_IfCurrentPlayer
Returns true if the current player has an expected tag.
Variables
PlayerTags - Which player tags are expected
MACTION_IfCurrentPlayerIsDerivedFrom
Returns true if the current player is a parent or child of the condition class. In other words, if the found actor is the same class or a sub-class of the condition class, it will return true.
Variables
ConditionClassName - What the current player's class needs to be a class or sub-class of to be true
MACTION_IfGameLanguage
Returns true if the game is currently using an expected language. Expected languages should be typed as they would be specified in Default.ini. Example: INT, ENG, or RUS.
Variables
ExpectedGameLanguages - Which game languages are expected
MACTION_IfGameState
Returns true if the game is currently in an expected game state.
Variables
ExpectedGameStates - Which game states are expected
MACTION_IfGetProp
Returns true if the TransferProp (referred to as the Get) matches the condition (dependent on GetType).
Variables
GetType - What get type should be used for the condition
GetProp.ActorClass - (The main Get actor) What actor class to locate
GetProp.ActorTag - (The main Get actor) What actor tag to locate
GetProp.Variable - (The main Get actor) What actor variable to locate
Condition - What the condition is (typically a number, but can be a string if GetType=GT_String)
OptionalVars.bGetFromConsoleCommandInstead - Whether a Get console command should be ran instead for the Get value
OptionalVars.GetCCString - If OptionalVars.bGetFromConsoleCommandInstead=true, what Get console command should be ran to get a value for the Get. Example: Get ini:Engine.Engine.ViewportManager WindowedViewportX will check whether your default windowed X resolution is a certain value, and makes that the value of the Get
OptionalVars.bConditionFromGetInstead - Should Condition be derived from a specific Get that's from an actor instead? If so, we will make OptionalVars.Condition_TransferProp be responsible for what Condition will equal
OptionalVars.Condition_TransferProp.GetActorClass - (The condition Get actor) What actor class to locate
OptionalVars.Condition_TransferProp.GetActorTag - (The condition Get actor) What actor tag to locate
OptionalVars.Condition_TransferProp.GetVariable - (The condition Get actor) What actor variable to locate
OptionalVars.bGetFromGlobalDataInstead - Whether global data should be obtained for the Get value
OptionalVars.DataType - If OptionalVars.bGetFromGlobalDataInstead=true, which data type should be used
OptionalVars.Slot - If OptionalVars.bGetFromGlobalDataInstead=true, which slot of data should be loaded
OptionalVars.bGetCurrentGameSlot - If OptionalVars.bGetFromGlobalDataInstead=true and if true, OptionalVars.Slot will equal the current game slot that is being run on
Keywords
GetProp.ActorTag or OptionalVars.Condition_TransferProp.GetActorTag='CurrentPlayer' - Targets the current player
MACTION_IfHasInventoryCount
Returns true if the current player has an inventory item count of iItemCountCondition or more from the specified inventory type. It's important to mention that a majority of inventory types are not modified correctly by the original game's pickups, but MPickup's do modify these correctly.
Variables
InventoryType - What inventory type to check
iItemCountCondition - What does the current player's item count from the specified inventory type have to be higher or equal to in order to return true
MACTION_IfInState
Returns true if the specified actor is in a specified state.
Variables
ActorClass -Â What actor class to locate
ActorTag -Â What actor tag to locate
StateName - What the state of ActorTag needs to be to return true
bControllerContext - If true, assumes that ActorTag is a pawn with a controller, and checks the state of their controller instead
Keywords
ActorTag='CurrentPlayer' - Targets the current player
MACTION_IfLogicalGate
Returns true if the logic gate type returns true. You can pick from 1 of 8 different common logic gates for the condition. Takes 2 inputs, both being take from a TriggeredCondition that is in the current map.
Variables
LogicGateType - Which logic gate type should be used for the condition
TriggeredConditionTags - Which two condition tags should the code search for? If using a buffer gate or a NOT gate, the second tag will be ignored
MACTION_IfMapExists
Returns true if an expected map is accessible (can be opened) by the game.
Variables
ExpectedMapNames - Which maps are expected
MACTION_IfMPakVersion
Returns true if the MPak version is expected.
Example: v6.0 (check the info MVersion in the source code to see what version of MGame you're using).
Variables
ExpectedMPakVersions - Which MPak versions are expected
MACTION_IfObjectDetail
Returns true if the current object detail mode is expected.
Variables
ExpectedObjectDetail - Which object details are expected
bInvertCondition - If true, inverts the condition
MACTION_IfPlayingAtXFPS
Returns true if the game's native FPS cap equals fExpectedMaxFPS.
Variables
fExpectedMaxFPS - The expected native FPS cap value
MACTION_IfPossessedByController
Returns true if the specific actor is possessed by a specific controller. The most useful function of this action is the ability to figure out whether or not the player is in a cutscene.
Variables
ActorClass - What actor class to locate
ActorTag - What actor tag to locate
ControllerClassNameCondition - What controller class we're making the condition
Keywords
ActorTag='CurrentPlayer' - Targets the current player
MACTION_IfSaveGameExists
Returns true if the game slot ID provided currently contains a saved game.
Variables
ExpectedSaveGames - Which save games are expected
MACTION_IfTodayIsWithinDateRange
Returns true if the current date is within the range of dates provided. Date format expected: MM/DD/YY. If ignoring a part of the date, it's recommended to use the number 0 to replace the part of the date you wish to ignore. However, this isn't strict, and can be any number you want.
Variables
sStartingDate - The starting date range
sEndingDate - The ending date range
bIgnoreDay - If true, the day isn't accounted for
bIgnoreMonth - If true, the month isn't accounted for
bIgnoreYear - If true, the year isn't accounted for
MACTION_LerpToPoint
Finds the KWPawn with the tag GetPawnTag and lerps/moves the pawn from its current point to the LerpToTarget point. Lerp in this context simply means to ease (or move) the position of a pawn from 1 location to another.
Variables
LerpToTime - How long should the Lerp take in seconds
EaseType - What kind of easing should be used
LerpToTarget.GetActorClass - (The actor to make the target of the moving pawn) What actor class to locate
LerpToTarget.GetActorTag - (The actor to make the target of the moving pawn) What actor tag to locate
GetPawnTag - (The pawn to move) What actor tag to locate
Keywords
GetPawnTag or LerpToTarget.GetActorTag='CurrentPlayer' - Targets the current player
MACTION_LocalizeData
Takes external data out of LocalizeActions.Localize.FileName and transfers that data to an actor (through SetProp). If the filename contains \\, you can read from a directory starting from ..\\System\\. An example of reading inside a folder: Cutscenes\\BeanStalkBonus_Intro will open the cutscene file BeanStalkBonus_Intro.int. Since these files are localization files, the data file it reads can be different, if the game's language is different. For instance, the game language INT (International) is the default language if you're playing on the English version of the game. This is essential for any sort of external resource management.
To understand how to use this action, you'll need to understand what a SectionName, Key, and FileName is. The easiest one is FileName, which is simply the name of the file you're trying to read from. Next, let's read the example below:
[CharInfo]
BBS=Bandit_Boss
BGY=Bored_Guy
BND=Bandit
DNK=Donkey
ELF=Elf
In this example, I've shown a part of the file GameData.int, which you can find in the game's System directory. Take note of the [] at the top of the file. When text is put in between brackets, this means the text is being classified as the name of this section. This means that the SectionName in this case equals CharInfo. Lastly, the Key. The Key is going to equal a line that is underneath the section. Examples: BBS, BGY, BND, DNK, and ELF are all Key's.
With this all being accounted for, how do we actually use this action? Let's say we wanted to get the string Bandit_Boss out of this particular example file. The SectionName would need to equal CharInfo, the Key would equal BBS, and FileName would need to equal GameData, since that's the file we're accessing with this function. If we ran this action with those provided values for the variables (with SetProp setup correctly), we would get the string Bandit_Boss SetProp'ed onto the actor of our choosing. Now you should understand how you can use this action!
Variables
LocalizeActions.Localize.SectionName - The name of the section
LocalizeActions.Localize.Key - The key name
LocalizeActions.Localize.FileName - The name of the file (do not add .int to the end of it)
LocalizeActions.SetProp.ActorClass - What actor class to locate
LocalizeActions.SetProp.ActorTag - What actor tag to locate
LocalizeActions.SetProp.Variable - What actor variable to locate
MACTION_LockCamTo
Locks or unlocks the player's camera to a specific point, just like cutscenes can. Stopping the LockCamTo is as simple as setting bLock=false and providing the actor that is currently being locked onto.
Variables
TargetActorClass - (The actor to lock onto) What actor class to locate
TargetActorTag - (The actor to lock onto) What actor tag to locate
bLock - If true, causes the camera to lock onto the target. If false, will unlock the camera
LockCone - The radius at which the current player can move their camera around while locked onto a target
fSpeed - The speed at which the camera will move to the target
fTightness - The tightness at which the camera will move to the target
MACTION_ManageAntiCheat
Manages M.A.C. (Master's Anti-Cheat) to change whether it's on or off. If M.A.C. is not placed in the current level, then it will be spawned in with the default settings.
Variables
bAntiCheatOn - Whether M.A.C. should be enabled
MACTION_ManageCameraEffects
Allows you to manage the current camera effects the current player's camera should be using. The camera effects feature is pretty unfinished overall and can't be improved any further, and it has a tendency of causing crashes. While this action tries to avoid crashing, there can be no guarantees. It's recommended to use MACTION_AddHUDTexture for the most part, since it has no risk of crashing. You should realistically only use this action for toggling motion blur.
Variables
CameraEffects - The array of camera effects to enable/set
MotionBlur_BlurAlpha - If any of the camera effects are MotionBlur, how strong should the effect be? Lower values are stronger, and higher values are weaker. A value of 255 means no motion blur
bPersistCameraEffects - If true, then when loading a save, all camera effects will persist
bAddEffectsInstead - If true, camera effects will be added, instead of being set
bClearSpecificEffects - If true, then ClearCameraEffects dictates which camera effects should be removed
ClearCameraEffects - If bClearSpecificEffects=true, which camera effects should be removed
MACTION_ManageCameraSettings
Manages the current camera settings. To modify a certain variable within the camera, first, head over into the CamChanges.CamChangesToApply variable, then toggle any of the variables in there. When you set them to true, you enable the ability for you to modify the individual variable. Out of the box, no camera variables will be modified, until they have been explicitly enabled by you. This means you have to specify which variables will be changed. For example, if we modified CamChanges.CamChangesToApply.bApply_vLookAtOffset=true, this makes it so that the variable vLookAtOffset changes the value of vLookAtOffset from within the current player's camera.
Additionally, most settings can be defaulted by setting CamChanges.CamChangesToApply.bDefaultAllApplications=true and then toggling which variables you want defaulted, just like you would normally (as previously explained). They can all also be randomized, in case you need the value to be randomized for some purpose. To enable randomization for a specific variable, just like how we toggled on certain variables, you have to toggle certain variables to be randomized, and then you have to specify the range of the random value afterward.
Important notice: some variables require specific scenarios that may require in-depth game knowledge to understand in order to apply.
Minor notice: An application of fLookAtDistance currently requires that the current player is using a MasterController.
Variables
CamChanges.CamChangesToApply.bDefaultAllApplications - If true, any features below that are activated will be defaulted instead of being set to a specific value
CamChanges.CamChangesToApply.bApply_rCamRotation - See below
CamChanges.CamChangesToApply.bApply_rCamRotationStep - See below
CamChanges.CamChangesToApply.bApply_fMinPitch - See below
CamChanges.CamChangesToApply.bApply_fMaxPitch - See below
CamChanges.CamChangesToApply.bApply_fMoveTightness - See below
CamChanges.CamChangesToApply.bApply_fMoveBackTightness - See below
CamChanges.CamChangesToApply.bApply_fRotTightness - See below
CamChanges.CamChangesToApply.bApply_fRotSpeed - See below
CamChanges.CamChangesToApply.bApply_fLookAtDistance - See below
CamChanges.CamChangesToApply.bApply_FOVSettings - See below
CamChanges.CamChangesToApply.bApply_vLookAtOffset - See below
CamChanges.CamChangesToApply.bApply_fLookAtOffsetX - See below
CamChanges.CamChangesToApply.bApply_fLookAtOffsetY - See below
CamChanges.CamChangesToApply.bApply_fLookAtOffsetZ - See below
CamChanges.CamChangesToApply.bApply_fLookAtHeight - See below
CamChanges.CamChangesToApply.bApply_fMoveSpeed - See below
CamChanges.CamChangesToApply.bApply_fMaxMouseDeltaX - See below
CamChanges.CamChangesToApply.bApply_fMaxMouseDeltaY - See below
CamChanges.CamChangesToApply.bApply_bGotoLastCameraMode - See below
CamChanges.CamChangesToApply.bApply_bAutoLevelCamera - See below
CamChanges.CamChangesToApply.bApply_bCameraControlsRotation - See below
CamChanges.CamChangesToApply.bApply_fDesiredCamDistFromWall - See below
CamChanges.CamChangesToApply.bApply_fCameraRollModifier - See below
CamChanges.CamChangesToApply.bApply_bDoWorldCollisionCheck - See below
CamChanges.CamRands.bRand_rCamRotation - See below
CamChanges.CamRands.bRand_rCamRotationStep - See below
CamChanges.CamRands.bRand_fMinPitch - See below
CamChanges.CamRands.bRand_fMaxPitch - See below
CamChanges.CamRands.bRand_fMoveTightness - See below
CamChanges.CamRands.bRand_fMoveBackTightness - See below
CamChanges.CamRands.bRand_fRotTightness - See below
CamChanges.CamRands.bRand_fRotSpeed - See below
CamChanges.CamRands.bRand_fLookAtDistance - See below
CamChanges.CamRands.bRand_vLookAtOffset - See below
CamChanges.CamRands.bRand_fLookAtOffsetX - See below
CamChanges.CamRands.bRand_fLookAtOffsetY - See below
CamChanges.CamRands.bRand_fLookAtOffsetZ - See below
CamChanges.CamRands.bRand_fLookAtHeight - See below
CamChanges.CamRands.bRand_fMoveSpeed - See below
CamChanges.CamRands.bRand_fMaxMouseDeltaX - See below
CamChanges.CamRands.bRand_fMaxMouseDeltaY - See below
CamChanges.CamRands.bRand_fDesiredCamDistFromWall - See below
CamChanges.CamRands.bRand_fCameraRollModifier - See below
CamChanges.CamRandRanges.Rand_rCamRotation - See below
CamChanges.CamRandRanges.Rand_rCamRotationStep - See below
CamChanges.CamRandRanges.Rand_fMinPitch - See below
CamChanges.CamRandRanges.Rand_fMaxPitch - See below
CamChanges.CamRandRanges.Rand_fMoveTightness - See below
CamChanges.CamRandRanges.Rand_fMoveBackTightness - See below
CamChanges.CamRandRanges.Rand_fRotTightness - See below
CamChanges.CamRandRanges.Rand_fRotSpeed - See below
CamChanges.CamRandRanges.Rand_fLookAtDistance - See below
CamChanges.CamRandRanges.Rand_vLookAtOffset - See below
CamChanges.CamRandRanges.Rand_fLookAtOffsetX - See below
CamChanges.CamRandRanges.Rand_fLookAtOffsetY - See below
CamChanges.CamRandRanges.Rand_fLookAtOffsetZ - See below
CamChanges.CamRandRanges.Rand_fLookAtHeight - See below
CamChanges.CamRandRanges.Rand_fMoveSpeed - See below
CamChanges.CamRandRanges.Rand_fMaxMouseDeltaX - See below
CamChanges.CamRandRanges.Rand_fMaxMouseDeltaY - See below
CamChanges.CamRandRanges.Rand_fDesiredCamDistFromWall - See below
CamChanges.CamRandRanges.Rand_fCameraRollModifier - See below
rCamRotation - The current camera rotation
rCamRotationStep - The camera rotation step values
fMinPitch - How low the camera can pitch
fMaxPitch - How high the camera can pitch
fMoveTightness - How tight is the camera movement
fMoveBackTightness - How tight is the camera movement when it moves back (happens when a wall behind the camera moves back or stops colliding)
fRotTightness - How tight is the camera rotation
fRotSpeed - How fast does the camera rotate
fLookAtDistance - How far should the current player be from the camera
bLookAtDistance_NoSmoothTransition - If true, removes the transition when applying the variable fLookAtDistance
FOVSettings.fFOV - What new FOV to change to
FOVSettings.fTime - How long in seconds this FOV change should take
FOVSettings.TransitionType - What kind of transition type should be used
vLookAtOffset - The camera offset (X,Y,Z)
fLookAtOffsetX - The camera offset (X)
fLookAtOffsetY - The camera offset (Y)
fLookAtOffsetZ - The camera offset (Z)
fLookAtHeight - How high should the camera look (relative to the current player)
fMoveSpeed - How fast should the camera move on its own
fMaxMouseDeltaX - The maximum amount of camera movement allowed at once on the X axis
fMaxMouseDeltaY - The maximum amount of camera movement allowed at once on the Y axis
bGotoLastCameraMode - If true, goes to the last camera mode
bAutoLevelCamera - If true, auto levels the camera
fAutoLevelCameraRotationPitch - The pitch that auto leveling should level to
bCameraControlsRotation - If true, allows the camera to control the camera's rotation. This is used in HP3 when Harry slides down the ice slides
fDesiredCamDistFromWall - How far the camera should be from anything it collides with (higher values decrease the ability to clip the camera through walls)
fCameraRollModifier - The multiplier for the camera's ability to roll
bDoWorldCollisionCheck - If true, the camera collides with the world
MACTION_ManageGamePausing
Allows you to enable or disable the ability to pause the game. This can cause hardlocks if the player opens up the pause menu while dying, so you need to keep that in mind when disabling pausing.
Variables
bAllowGamePausing - If true, the game will be allowed to pause. If false, then the game will be unable to pause
MACTION_ManageHUDItems
Loads or unloads any HUD item onto the screen, and can be configured via SetProps. Most HUD items aside from MHUDItem's will typically not persist across save-loads.
Variables
ManageHUDItemsActions.HUDItemToAdd - The HUD item to add, or to remove depending on bRemoveInstead
ManageHUDItemsActions.bRemoveInstead - If true, removes the HUD item instead of adding it
ManageHUDItemsActions.SetProps.sVariable - The variable to set to
ManageHUDItemsActions.SetProps.sValue - The value to set to the variable
MACTION_ManageStrengthAttribute
Manages the strength attribute on a specific playable character. This is purely a visual change, so it does not actually give the playable character additional attack damage.
Variables
ManageStrengthAttributeActions.PlayerType - Which player type should be modified
ManageStrengthAttributeActions.bNewVisibility - If true, the strength attribute will be made visible
ManageStrengthAttributeActions.bToggleInstead - If true, toggles the strength attribute instead of setting it
bPickRandom - If true, picks 1 random ManageStrengthAttributeActions to run
MACTION_ManageTimer
Manages the timer HUD, allowing you to turn on a timer visual, or to turn it off.
Variables
fTimerSeconds - How much time should the new timer being created have
bLoopTimer - If true, the timer will loop indefinitely
bTurnOffTimerInstead - If true, the timer is turned off instead
MACTION_OnEvent
Runs the OnEvent() function for a specified actor. Read more about OnEvent() here.
Variables
OnEventActions.PawnClass - What pawn class to locate
OnEventActions.PawnTag - What pawn tag to locate
OnEventActions.nOnEvent - What event name should be fired to for the OnEvent()
bPickRandom - If true, picks 1 random OnEventActions to run
Keywords
OnEventActions.PawnTag='CurrentPlayer' - Targets the current player
MACTION_PawnLookAt
Makes a specified pawn look at a destination.
Variables
PawnClass - (The pawn to turn) What pawn class to locate
PawnTag - (The pawn to turn) What pawn tag to locate
DestinationActorClass - (The actor to turn to) What actor class to locate
DestinationTag - (The actor to turn to) What actor tag to locate
bTrack - If true, then PawnTag will track DestinationTag, meaning it makes PawnTag additionally turn to DestinationTag. This will not work if PawnTag is the current player
bLookAt - If true, PawnTag will look toward DestinationTag. If false, then PawnTag will stop looking at everything
Keywords
PawnTag or DestinationTag='CurrentPlayer' - Targets the current player
MACTION_PawnTurnTo
Makes a specified pawn turn to a destination.
Notice: this doesn't work for the current player; use a cutscene for that.
Variables
ActorClass - (The actor to turn) What actor class to locate
ActorTag - (The actor to turn) What actor tag to locate
DestinationActorClass - (The actor to turn to) What actor class to locate
DestinationTag - (The actor to turn to) What actor tag to locate
bUseTime - If true, a set amount of time will be applied to the turn
fTurnDuration - If bUseTime=true, the amount of time a turn will take
fRateMag - The magnitude at which a turn should be done
bInstant - If true, the turn will be done instantly
Keywords
DestinationTag='CurrentPlayer' - Targets the current player
MACTION_PlayCredits
Plays the credits with a new credits system I coded, or can optionally play your own custom credits read from the map's data file.
With this new credits system comes some configuration, which is done directly in the credit's file. If you wish to configure your credits, you must provide this entire block of text:
[Settings]
fInitialPauseDelay=0.0
bSkippable=true
fCreditsScrollRate=1.0
fHorizontalOffset=0.0
sMapToOpenOnceFinished="Book_FrontEnd"
BackgroundMaterial="Storybook_TX.Interior_2"
The settings/variables above are the default settings, but you can adjust them to your liking. If you adjust any of the settings, you must provide every setting. If you're using a custom credits file from within the map's data file, you still must provide each line manually, followed by an empty space as shown above.
Variables
sCreditsFileName - The file to read from the System directory
CustomCreditLines - If provided with any lines, this will be the credits that will be shown instead
Settings
fInitialPauseDelay - How long should it take in seconds before the text begins to scroll from the bottom of the screen
bSkippable - If true, the credits will be skippable by pressing the Escape key
fCreditsScrollRate - The rate at which the credits will scroll across the screen. Higher values equals faster scrolling speeds
fHorizontalOffset - The horizontal offset to apply to the credits. Adjusting this allows you to move the credits to the left or the right of the screen
sMapToOpenOnceFinished - The map to open once the credits are finished. If provided with nothing, no map will be opened
BackgroundMaterial - The material to render in the background of the credits. If provided with nothing, the game will still be visible with the credits overlayed on top of the game window
MACTION_PlayerConsoleCommand
Executes a player console command (a player console command is meant to refer to a PlayerController executing a console command, instead of running the function ConsoleCommand(), which is limited to have almost no useful console commands). Supports executing a random console command, getting a console command from a TransferProp, replacing phrases through TransferProp and picking a random replace phrase.
Variables
ConsoleCommands - Which console commands should be fired to
bPickRandom - If true, picks 1 random ConsoleCommands to run
bPullCommandFromTransferProp - If true, then PullTransferProp will pull console commands from a TransferProp. These start replacing ConsoleCommands from the index of 0, until it iterates through every PullTransferProp.
PullTransferProp.GetActorClass - (For use in PullTransferProp) What actor class to locate
PullTransferProp.GetActorTag - (For use in PullTransferProp) What actor tag to locate
PullTransferProp.GetVariable - (For use in PullTransferProp) What actor variable to locate
bReplacePhraseWithTransferProp - If true, ReplacePhrases (ReplacePhraseActions) will be enabled, and will TransferProp by default
ReplacePhraseActions.ReplacePhrase - What phrase to look for and to replace. This should be something distinct, like %s
ReplacePhraseActions.bDontTransferProp - If true, will not use TransferProp. This is only an option due to randomization support
ReplacePhraseActions.ReplaceComment - If ReplacePhraseActions.bDontTransferProp=true, the comment to use for the replace phrase
ReplacePhraseActions.TransferProp.GetActorClass - (For use in ReplacePhraseActions) What actor class to locate
ReplacePhraseActions.TransferProp.GetActorTag - (For use in ReplacePhraseActions) What actor tag to locate
ReplacePhraseActions.TransferProp.GetVariable - (For use in ReplacePhraseActions) What actor variable to locate
ReplacePhraseActions.Index - What array index to replace the phrase with. This should match the index of the array you're modifying
bPickRandomReplacePhrase - If true, picks 1 random ReplacePhraseActions to run
Keywords
PullTransferProp.GetActorTag='CurrentPlayer' - Targets the current player
MACTION_PlayMusic
A better version of ACTION_PlayMusic that allows you to play a song, randomly play a song or stop all songs.
Variables
Songs - What song(s) to play. Only provide multiple songs if bPickRandom=true
fFadeOutTime - How long in seconds to fade out the current song
fFadeInTime - How long in seconds to fade in the new song
bDoNotLoop - If true, the song will not loop
bPickRandom - If true, picks 1 random Songs to play
bStopMusic - If true, stops all music instead
MACTION_PlaySound
Plays a localized or un-localized sound. For the localized sound part of this action, you can assign any actor to be the owner of the sound.
Variables
Sounds - What sound(s) to play. Only provide multiple sounds if bPickRandom=true
Actors.GetActorClass - What actor class to locate
Actors.GetActorTag - What actor tag to locate
bControlVolume - If true, fVolume will determine the volume of the sound
fVolume - If bControlVolume=true, how loud should the sound be
LocalizeSoundVars.fRadius - How far should you be able to hear the sound
LocalizeSoundVars.fPitch - What pitch should the sound play at
bPickRandom - If true, picks 1 random Sounds to play
bPlaySound3D - If true, localizes the sound to the Actors with the same index as Sounds
bMoveMouth - If true, will move the current player's mouth in accordance with the dialog playing. If this dialog is modded, the mouth won't move regardless
Keywords
Actors.GetActorTag='CurrentPlayer' - Targets the current player
MACTION_PopupText
Pops up text onto the screen, just like how the PopupTrigger is somewhat capable of doing, but in a much more simple manner. Provides simple customization for a text popup that utilizes the KnowWonder subtitle system. This is a simple and effective method of displaying custom text on the screen, without announcing it in the center of the screen.
Variables
PopupTexts.sPopupMessage - The bottom text that will be displayed
PopupTexts.sTopPopupMessage - The top text that will be displayed
PopupTexts.fPopupDuration - How long should the text appear in seconds
cTextColor - The color of the text
bRandomizeTextColor - If true, randomizes the color of the text
bPickRandom - If true, picks 1 random PopupTexts to popup
MACTION_RoundRobin
Emulates a physical RoundRobin actor that works by going through a cycle of various GotoActions. In addition to the default RoundRobin, you can also customize how many times it will loop.
Variables
RoundRobinType - Which RoundRobin type should be used for this action
ActionNums - The array of all ActionNums that can be gone through (in order)
EndActionNum - If the type of RoundRobinType is not RT_Loop, which action to go to once the RoundRobin is complete
LoopIterations - If the type of RoundRobinType is RT_Loop_X, how many times should the RoundRobin loop before the loop ends
MACTION_SaveLoadGame
Saves or loads a game. Simply provide a save slot ID along with whether you wish to save or load a game. Can also save or load to the current save slot.
Variables
ActionType - Whether to save or load a game
SaveSlotID - Which save slot to target
bGetCurrentGameSlot - If true, makes SaveSlotID equal the current game slot
bPlaySaveSound - If true, then the sound SaveSound will play if a save is being done
SaveSound - If bPlaySaveSound=true, what sound to play if a save is being done
MACTION_SaveLoadInventory
Saves or loads an inventory from global data. Simply save an inventory, then load it back any time! The inventory is considered to be everything the current player has collected, but can be adjusted by removing certain inventory types in the InventoryTypesToSave variable.
Variables
ActionType - Whether to save or load an inventory
InventoryTypesToSave - Which inventory types to save
MACTION_SetFOV
Sets the current player's current FOV to a specified value. Can be added or multiplied to and can be randomized. An ease type and time can also be specified.
Variables
fNewFOV - What new FOV should be assigned
fChangeTime - How long it should take for the FOV to change
EaseType - What ease type should be used when transitioning the FOV value
bAddFOV - If true, adds to the current FOV instead
bMultiplyInstead - If true, multiplies the current FOV instead
bUseRandValues - If true, makes fNewFOV equal a random value that is dictated by Rand_MinMaxValues
Rand_MinMaxValues - If bUseRandValues=true, the range of random values to use
Keywords
fNewFOV=-1.0 - Changes to default FOV
MACTION_SetGameState
Sets the GameState the game is currently in. This action is arbitrarily restricted to only work for the 6 GameStates shown in KnowWonder debug menu. You can optionally run a TransferProp to make a variable on a certain actor equal the current GameState.
Variables
NewGameState - What the new GameState should be
bTransferPropGameStateInstead - If true, runs a TransferProp on an actor with the current GameState instead of setting the GameState
TransferProp.ActorClass - What actor class to locate
TransferProp.ActorTag - What actor tag to locate
TransferProp.Variable - What actor variable to locate
MACTION_SetGlobalData
Sets a value to a slot in global data.
Variables
DataActions.Slot - Which slot of data should be accessed
DataActions.DataType - What data type do we save to
DataActions.Value - What is the new value for the data
DataActions.bGetCurrentGameSlot  - If true, makes DataActions.Value equal the current game slot
bResetAllGlobalData - If true, resets/deletes all global data
MACTION_SetPawnGroundFriction
Sets a pawn's ground friction value. A manual ground friction change can be enabled or disabled on a per-pawn basis.
Variables
PawnClass - What pawn class to locate
PawnTag - What pawn tag to locate
bOverrideGroundFriction - If true, overrides the ground friction value for the specified pawn with fNewFriction. If false, then the ground friction value for the pawn will be defaulted
fNewFriction - The new ground friction value for the pawn
Keywords
PawnTag='CurrentPlayer' - Targets the current player
MACTION_SetProp
Sets a variable to a specific value on a specific actor. If you're looking for extreme customization, or more documentation regarding how this action can be used, look into the action MACTION_SetPropPlus.
Variables
SetPropActions.LogicType - What logic type should be used when setting a property
SetPropActions.ActorClass - What actor class to locate
SetPropActions.ActorTag - What actor tag to locate
SetPropActions.Variable - What actor variable to locate (SetPropActions.LogicType can override this with its own variables)
SetPropActions.Value - What value to set to SetPropActions.Variable (SetPropActions.LogicType can override this with its own variables)
SetPropActions.ActorProps.RandomVars.RandType - What data type is going to be used during this randomization
SetPropActions.ActorProps.RandomVars.MinMaxValues - The range of values that can be picked between at random
SetPropActions.ActorProps.TransferProp.GetActorClass - (For TransferProp) What actor class to locate
SetPropActions.ActorProps.TransferProp.GetActorTag - (For TransferProp) What actor tag to locate
SetPropActions.ActorProps.TransferProp.GetVariable - (For TransferProp) What actor variable to locate
SetPropActions.ActorProps.bControllerContext - If true, the SetProp will use the controller's variables instead of the actor's variables (controller variables are only available on pawns that have controllers)
SetPropActions.ActorProps.bAddProp_MultiplyInstead - If SetPropActions.SetPropType=LT_AddProp or SetPropActions.SetPropType=LT_AddPropRand, should we multiply instead of adding
Keywords
SetPropActions.ActorTag or SetPropActions.ActorProps.TransferProp.GetActorTag='CurrentPlayer' - Targets the current player
MACTION_SetPropPlus
Sets a variable to a specific value on a specific actor... or does virtually anything related to this. Do be wary that if you don't know what you're doing that you likely shouldn't use this action. Also, this action is very, VERY complex and not that intuitive at the current moment. All features can be heavily customized and most options will work with each other. There is an extreme amount of customization this action has; read below to learn more.
Main Features:
Set Property (or random)
Add/Multiply Property (or random)
Transfer Property
Set State, Collision, Collision Size, DrawScale, DrawScale 3D, Static Mesh, Draw Type, Location, Rotation or Physics
Save or Load global data (via TransferProp)
Features that are outside the scope of this action:
Array data types (however, you can get/set the first entry in an array)
Taking a string with vector or rotator data from a TransferProp and setting the location (or rotation) of another actor with that data (however, you can still apply this to other vector or rotator values; just not location and rotation)
Variables
SetPropActions.LogicType - What logic type should be used when setting a property
SetPropActions.SetPropType - What set type should be used when setting a property
SetPropActions.ActorClass - What actor class to locate
SetPropActions.ActorTag - What actor tag to locate
SetPropActions.Variable - What actor variable to locate (SetPropActions.LogicType and SetPropActions.SetPropType can override this with its own variables)
SetPropActions.Value - What value to set to SetPropActions.Variable (SetPropActions.LogicType and SetPropActions.SetPropType can override this with its own variables)
SetPropActions.ActorProps.RandomVars.RandType - What data type is going to be used during this randomization
SetPropActions.ActorProps.RandomVars.MinMaxValues - The range of values that can be picked between at random
SetPropActions.ActorProps.TransferProp.GetActorClass - (For TransferProp) What actor class to locate
SetPropActions.ActorProps.TransferProp.GetActorTag - (For TransferProp) What actor tag to locate
SetPropActions.ActorProps.TransferProp.GetVariable - (For TransferProp) What actor variable to locate
SetPropActions.ActorProps.PlayerState - What state will be set on the pawn
SetPropActions.ActorProps.bControllerContext - If true, the SetProp will use the controller's variables instead of the actor's variables (controller variables are only available on pawns that have controllers)
SetPropActions.ActorProps.SetCollision.bNewCollideActors - The new value for bCollideActors
SetPropActions.ActorProps.SetCollision.bNewBlockActors - The new value for bBlockActors
SetPropActions.ActorProps.SetCollision.bNewBlockPlayers - The new value for bBlockPlayers
SetPropActions.ActorProps.SetCollisionSize.NewCollisionRadius - The new value for CollisionRadius
SetPropActions.ActorProps.SetCollisionSize.NewCollisionHeight - The new value for CollisionHeight
SetPropActions.ActorProps.SetDrawScale - What DrawScale to set
SetPropActions.ActorProps.SetDrawScale3D - What DrawScale3D to set
SetPropActions.ActorProps.SetStaticMesh - What StaticMesh to set
SetPropActions.ActorProps.SetDrawType - What DrawType to set
SetPropActions.ActorProps.SetLocAndRot - What Location, Rotation, or both to set
SetPropActions.ActorProps.SetPhysics - What Physics to set
SetPropActions.ActorProps.bAddProp_MultiplyInstead - If SetPropActions.SetPropType=LT_AddProp or SetPropActions.SetPropType=LT_AddPropRand, should we multiply instead of adding
SetPropActions.ActorProps.bTransferProp_Save - Should TransferProp do a save or load of global data
SetPropActions.ActorProps.bTransferProp_GetCurrentGameSlot - If true, makes SetPropActions.ActorProps.TransferProp_SaveSlot equal the current game slot
SetPropActions.ActorProps.bTransferProp_PullSpecificVar - Should a specific variable be pulled from a variable when transferring data? This is specifically for the pawn's location vector and rotator and assigning an individual value to a float or int variable
SetPropActions.ActorProps.bTransferProp_SetLocOrRotFromOneValue - If true, then the value pulled from SetPropActions.ActorProps.TransferProp.GetVariable will become the value for a specified axis of location or rotation
SetPropActions.ActorProps.TransferProp_PullSpecificVar - What specific variable from a variable should be pulled? Example: Pulling VP_Loc_Y from a vector would return with its Y value and assign it
SetPropActions.ActorProps.TransferProp_ManageDataType  - What type of data transfer should be done
SetPropActions.ActorProps.TransferProp_DataType - What type of data is going to be transferred
SetPropActions.ActorProps.TransferProp_SaveSlot - What global data slot should the data be transferred to or from
Keywords
SetPropActions.ActorTag or SetPropActions.ActorProps.TransferProp.GetActorTag='CurrentPlayer' - Targets the current player
MACTION_ShakeView
Shakes the current player's screen with the settings provided. This is essentially a port of the ViewShaker actor, but without the need for an additional actor.
Variables
fViewRollTime - How long to roll the current player's view
fRollMag - How far to roll the current player's view
fRollRate - How fast to roll the current player's view
fOffsetMagVertical - Max view offset vertically
fOffsetRateVertical - How fast to offset the current player's view vertically
fOffsetMagHorizontal - Max view offset horizontally
fOffsetRateHorizontal - How fast to offset the current player's view horizontally
fOffsetIterations - How many iterations to offset the current player's view
MACTION_SwitchControlTo
Switches the currently controlled player to a different player. Similar to the SCTP or SwitchControlToPawn console command, however, this supports adding a time between switches and the ability to swap the locations of both of the players. Supports randomizing the player label to switch control to.
Variables
NewPlayerLabels - Who is the current player going to control next. Provide multiple labels if bPickRandom=true
fTimeToSwitch - How long should the camera take to transition between the two players. This does not mean how long it takes for the current player to gain control of the next player
bSwapLocations - Should the locations of the players be swapped
bPickRandom - If true, picks 1 random NewPlayerLabels to switch control to
MACTION_Teleport
Teleports an actor to a specified point. If the teleportation point is blocked, then the teleportation location is slightly adjusted to try to make it work.
Variables
ActorClass - (The actor to be teleported) What actor class to locate
ActorTag - (The actor to be teleported) What actor tag to locate
TargetActorClass - (The actor to teleport to) What actor class to locate
TargetActorTag - (The actor to teleport to) What actor tag to locate
bRotateToPoint - If true, the actor (and camera if applicable) will rotate to the teleportation point's current rotation
TeleportSound - If provided a sound, what sound to play when teleported
TeleportFailedSound - If provided a sound, what sound to play when a teleport fails. A teleport will fail if the location is blocked
fTeleportSoundVolume - The volume the teleport sound should play at
iTeleportAdjustRetryAttempts - How many times should a teleport be retried if the teleport initially fails (due to the location being blocked). A safe value is 28, however if a teleport you need isn't working consistently, you may need to increase this value (however, higher values may impact performance)
bTeleportAdjustZOnly - If true, if a teleport fails, teleport adjustment attempts will only be made on the Z axis
Keywords
ActorTag or TargetActorTag='CurrentPlayer' - Targets the current player
MACTION_TransferClipboard
Gets a string from the computer's clipboard, then transfers that data onto an actor.
Variables
TransferClipboardActions.ActorClass - What actor class to locate
TransferClipboardActions.ActorTag - What actor tag to locate
TransferClipboardActions.Variable - What actor variable to locate
TransferClipboardActions.bControllerContext - If true, the SetProp will use the controller's variables instead of the actor's variables (controller variables are only available on pawns that have controllers)
bPickRandom - If true, picks 1 random TransferClipboardActions to run
Keywords
TransferClipboardActions.ActorTag='CurrentPlayer' - Targets the current player
MACTION_TriggerRandomEvent
Triggers a random event upon being fired. If enabled, supports using weighted odds to make certain events have a higher chance of being fired.
Variables
RandEvents.Event - Which event will be fired to, if this choice is picked
RandEvents.Weight - If bWeightedOdds=true, the weight/chance of the choice. Higher values equal higher odds of being picked
bWeightedOdds - If true, will make the odds of picking out a random event weight-based
MACTION_WaitForCutscene
Waits until all current cutscene(s) stop playing.
Variables
bIncludeNonCinematicCutscenes - If true, then we wait until all cinematic and non-cinematic cutscenes end
MACTION_WaitForEventSimple
Waits for the event with the name that is the event on the ScriptedTrigger that instigated this script. Should be typically used for a MScriptedTrigger since it has very good native support for this action. If you're using a ScriptedTrigger instead, then give the ScriptedTrigger a unique Event in order to satisfy this action's condition.
Notice: do not provide an ExternalEvent as it is pointless.
MACTION_WaitForTimer
Waits a certain amount of time before continuing the AIScript. Can be assigned a random time and can be assigned a time from a TransferProp.
Variables
PauseTime - How long to pause for
bUseRandomValues - If true, makes PauseTime equal a random value that is derived from Rand_MinMaxValues
Rand_MinMaxValues - If bUseRandomValues=true, the range of random values to use
bPullPauseTimeFromTransferProp - If true, make PauseTime equal a value from a TransferProp instead
TransferProp.GetActorClass - What actor class to locate
TransferProp.GetActorTag - What actor tag to locate
TransferProp.GetVariable - What actor variable to locate
Keywords
TransferProp.GetActorTag='CurrentPlayer' - Targets the current player