[*Back to Index*](index.md.html) ActionFX base class =============== ActionFX is the base class of all FX actions mod items. Objects of this type are used for playing sound effects, placing different objects at a desired moment, adding sound and particles when an action is executed, etc. ActionFX mod items =============== Below is a list of available ActionFX mod items, which can be used to trigger various visual and sound effects. [ActionFXSound](ModItemActionFXSound.md.html) : Plays sound effects when an FX action is played. [ActionFXColorization](ModItemActionFXColorization.md.html) : Colorizes a target object when an FX action is played. [ActionFXDecal](ModItemActionFXDecal.md.html) : Places a decal when an FX action is played. [ActionFXObject](ModItemActionFXObject.md.html) : Places an object when an FX action is played. [ActionFXLight](ModItemActionFXLight.md.html) : Places light sources when an FX action is played. [ActionFXParticles](ModItemActionFXParticles.md.html) : Places particle systems when an FX action is played. All ActionFXs have the following common properties: Match property group --------------- Action : The effect will be triggered with a certain animation. Available dropdown with events/actions to choose from. Moment : The effect will be triggered in a certain moment from the animation. Available dropdown with moments to choose from. Actor : FX actor object. The actor is the one triggering the effect. Target : FX target object. The effect is applied on the target. Game State : Mark the game states in which the the effect is allowed. FxId : Empty by default. FX Remove requires it to define which FX should be removed. Detail level category (self.DetailLevel) : Determines the options detail levels at which the FX triggers. "Essential" will trigger always, "Optional" at high/medium setting, and "EyeCandy" at high setting only. Chance : Chance for the FX to be played. Disabled : Disabled FX are not played. Lifetime property group --------------- Delay : In-game time. FX is not played when the actor is interrupted while in the delay. Time : Lifetime in milliseconds of the placed FX object. EndRules : ActionFXEndRule objects which will destroy the current ActionFX object when triggered. Behavior : Method which will be called when the associated BehaviorMoment is hit. BehaviorMoment : Moment used for calling the specified Behavior method. Test property group -------------- Solo : Debug feature. If any FXs are set to solo, only they will be played. DebugFX : Debug feature, print when this FX is about to play. Break : Debug feature, break execution in code when this FX is about to play. Anim Entity : Specifies that this FX is linked to a specific animation. Auto fills the animations and moments available. An error will be issued if the action and the moment aren't found in that entity. PlayFX code function --------------- Call this function in order to trigger all FXs matching the given class, moment, actor and target. function **PlayFX**(actionFXClass, actionFXMoment, actor, target, action_pos, action_dir) actionFXClass : Match FX objects whose Action property has this value. actionFXMoment : Match FX objects whose Moment property has this value. actor : The actor of the specified action. target : The target of the specified action. action_pos : The position in world coordinates for the action. action_dir : The direction vector used by the action. Testing Mod Items ================= When clicking on the "Test" button for the ActionFX mod items in the Mod Editor, the following function call is made: **PlayFX**(self.Action, self.Moment, SelectedObj, SelectedObj) (insert footer.md.html here)