File size: 4,043 Bytes
b6a38d7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
[*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)
<!-- Markdeep: --><style class="fallback">body{visibility:hidden;white-space:pre;font-family:monospace}</style>
<script src="markdeep.min.js"></script>
<script src="https://casual-effects.com/markdeep/latest/markdeep.min.js"></script>
<script>window.alreadyProcessedMarkdeep||(document.body.style.visibility="visible")</script>