[*Back to Index*](index.md.html) ActionFX =============== ActionFX is the base class of all FX actions. 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. Properties --------------- Action : Name of the action, which triggers this FX. Moment : Trigger moment. Actor : FX actor object. Target : FX target object. Map : Map, on which the FX can be triggered. Default is "any". FxId : Not applicable for the implemented ActionFX mod items. 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. Solo : Debug feature, if any fx's are set to solo, only they will be played. Delay : In-game time. FX is not played when the actor is interupted while in the delay. Time : Lifetime 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. PlayFX --------------- Call this function in order to trigger all FX's 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. Mod Items =============== Below is a list of subclasses of ActionFX, which have been implemented as mod items and can be used to trigger various visual and sound effects. Example usage of these can be found in the Cemetery sample mod. [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. 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) If you need to call the function with different arguments, use the console. (insert footer.md.html here)