HitFX (Asset)
A HitFX is a collection of particles, CSS effects, and audio to play. Often tied to a text to add particles and sound effects to attacks.
| Field | Type | Default | Description |
|---|---|---|---|
| Label | String | A unique label to access your HitFX by. Do not change after setting it up! | |
| Description | String | Describe your effect, only used in the editor. | |
| Stagger | Int | 0 | Force a time in milliseconds between triggers. Usually used for AoE to prevent the HitFX to play at the same time on all targets. |
| Once | Boolean | False | Used in events with multiple targets (such as AoE) to only play the effect once. Especially if the effect only plays on the sender. |
| Hit Time | Int | 0 | Can be used for audio triggers to play the combat hit grunts after this amount of milliseconds. |
| Data | JSON Array | [] | Here is where you create various stages of the hit effect. The most simple hitFX has only one. See below. |
Data
Data is a JSON array of stage objects. None of them are required, and you can omit anything where you want to use the default value.
| Field | Type | Default | Description |
|---|---|---|---|
| particles | string or object | none | ID of a particles asset to use for this stage. You can optionally make it an object if you wish to tweak some settings of the particle system, such as color. See below. |
| emit_duration | int | 200 | How long to emit or play a sound for. In milliseconds. |
| fade_duration | int | 2000 | Time in milliseconds after emit_duration to remove the particle system. Make sure all particles are dead before this time or they'll clip out. |
| hold | int | 0 | Hold for this amount of milliseconds before advancing to the next stage. |
| tween | boolean | true | Tween from origin to destination. If false, only destination is used. |
| origin | string | "victim" | Where the particle system should originate from. Can be victim or sender. |
| origin_rand | float | none | If unset, it'll use the last stage object's origin. Randomizes how far from the center of the origin portrait to start the particle system. |
| destination | string | "victim" | Where the particle system should end up. Can be victim or sender. |
| destination_rand | float | none | If unset, use the previous stage's origin. Randomizes how far from the center of the target portrait to end the particle system. |
| start_offs | obj | {"x":0,"y":0} | Adds an offset to the starting position of the particle system. |
| end_offs | obj | {"x":0,"y":0} | Adds an offset to the ending position of the particle system. |
| easing | string | "Cubic.In" | An easing type from the Tween.js library. |
| sound_kits | array | [] | An array of AudioKit labels. |
| css_fx | str | none | Name of a CSS animation effect to run on the target. See the div.fx... styles in the main CSS for viable options. |
| css_fx_targ | str | "victim" | Target to run the css animation on. Either "victim" or "sender". |
Particle Overrides
Instead of supplying just an ID to particles, you can specify a JSON object using the "id" property as the ID of the particle system, followed by any amount of settings. Ex: {"id":"darkOrb", "cA":"#FFFFFF"} Picks the darkOrb particle system and sets the start color to white.
Overrides can use the following fields:
| Field | Type | Description |
|---|---|---|
| oA | float | Particle start opacity |
| oB | float | Particle end opacity |
| oE | string | Easing function specified in the three.proton.js library. |
| cA | string | Start color, hex, with hashtag. Ex #AAAAAA |
| cB | string | End color, hex with hashtag. |
| g | float | Gravity. |
| rate | float | Particle emission rate. |
| count | int | Num particles to emit for each emission. |
| sA | float | Min particle size. |
| sB | float | Max particle size. |
| stA | float | Start scale. |
| stB | float | End scale. |
| stE | string | Easing function specified in the three.proton.js library. |
| rAA | float | Start rotation min. |
| rAB | float | Start rotation max. |
| rBA | float | End rotation min, or end rotation flat with FWD type. |
| rbB | float | End rotation max (only used with ADD) |
| rT | string | Rotation type. See ParticleSystem.js |
| vA | float | Velocity min. |
| vB | float | Velocity max. |
| vX | float | Vector dir X. |
| vY | float | Vector dir Y. |
| vZ | float | Vector dir Z. |
| vT | float | Theta. |
| lA | float | Particle life min. |
| lB | float | Particle life max. |
| lT | boolean | Line targeted (places particles on a line between sender and target) |
| eT | float | Emitter translation speed. |
| eA | float | Emitter translation angle. |