Fx System Tutorial

Jump to: navigation, search


{{under construction|This tutorial is being overhauled, the later parts of this tutorial are still in-process, and more screenshots are still needed.

Caution: This page may contain information which is Hero's Journey-specific!
He intermediate.png
This is an intermediate-level tutorial, on how to work with the Fx System. For a basic overview tutorial, see Creating an Fx

The Fx System is used to combine particle effects, lights, sounds, and other effects such as lightning, mirrors, and flares, and combine them all together into an amazing "Fx".


An Fx is an instanced node, created from an Fx template or an "Fx spec". When designing an Fx, you are actually designing an Fx spec, which will be the template from which the Fx nodes are created. For the purpose of this tutorial "Creating an Fx" means "creating an Fx spec", which is the same as "designing" an Fx spec.

To create an Fx spec, you will use the Spec Oracle editor. There are multiple Spec Oracles in HeroEngine, for other things than just Fxs. Each Spec Oracle can be thought of as a container for individual specs.

The Spec Oracle editor for Fxs, is called the "Fx Browser".

Open the Fx Browser

To access the Spec Oracle editor:

This provides a list of every Fx Spec Oracle that has been created in your current world. The list may be long or short, depending on current development. This tutorial is written from the expectation that you are in an "empty" Clean Engine world. If you access the Fx Spec Oracle in Hero's Journey Reference, or in a world which has already been undergoing development from your company, you may see many Spec Oracles.

The list can be sorted by SpecKey, Name, or Description, by clicking on the headers.

Fx ToolBar Icons

Fxgui taskbar.jpg

Icons 2 through 4 on the FxToolbar are toggle icons. Click on them to turn panels on and off:

Hovering over the other icons will give you a tip as to what they are for:

FxTasks and FxGroups

Every Fx you create may have one or more 'FxTasks'. An FxTask is something that can happen. There are two types:

All these tasks are held in the main Fx container, called an FxGroup. In your task browser and the Fx Toolbar, this is the FxBox icon, that has the letters "Fx" over an open box.

Add a particle effect FxTask to the FxGroup

To add an FxTask, such as a particle effect, click the icon of what you want to add in the FxToolbar, and drag it on top of the fxgNewFxGroup

Specify a location for the FxTask

Now you'll specify where the particle effect that you've chosen should appear.

In the FxSystem panel:

Preview different locations

In the FxEmitter Properties sheet, StartLocBone just under StartLoc lets you specify a bone name. If your CASTER is a character, and has a bone of the name you specified, the particle effect will appear there.

StartLocOffset lets you specify an exact position away from the start location.

Note: Anytime you make a change in a textbox, hitting ENTER, TAB or ESCAPE or just clicking away should save the change

Save the Fx


Next, we'll add a model asset that can be held by the character.

Note: AttachTo always overrides StartLoc. This is because it attaches it immediately after placing it.

Every 3dInstance task, such as particle effects, zaps, models, lights, 3dsounds, mirrors, and flares, can work the same way, with a starting location and then attaching.

Attachment delays

attachDelay means wait that amount of time before attaching (you may need to scroll down in the FxModel Properties sheet to see this option).


An Event is 'when something happens'. Most things you can add to an Fx can Start and stop, therefore, they have an ONFXSTART and ONFXSTOP event.

In our current tutorial, we have two things:

Each one will Start and stop. When they do, they tell everything else that they did so.


The Fx will appear, but probably will not look like lightning yet, depending on your current view. This is because if you do not specify a target, it targets 0,0,0 in your immediate area.


This section is in-process, and may not work properly

Add another particle emitter:

Next, we will take the sparklies and make them fall out of our particle effect no matter where it goes. To do that, we tell them to attach to the particle effect.

The spark ball should now appear above your head with the sparklies falling below

Chasing a target

To have the SparkBall chase a target:


The Fx will not go anywhere unless it has a speed.

Note that particle effects cannot target a bone, they can only target an instance. The way to work around this, is to attach something invisible to the bone you want to target, and then have the chaser target that. One method is to create some "invisible" particle effects, such as a particle effect that emits an empty polygon once every 10 seconds, and call it PlaceHolder. Or make an invisible particle effect that rotates, and then attach something to id.

To edit your own particle effects, see Copying particle effects. Add a copy of the one you want to change in your area, then click Copy Particle Asset Chain, which makes a new one in your area which should be editable.


There are three types of Sound:

To add a sound to the Sparkball:


The new tasks will appear under NewFx, instead of fxgNewFxGroup

If you run into trouble, click one of the other tasks and change its name. This will make it rebuild, and may help.

We want all 3 of these new tasks to happen at the same time and at the same place.

Note: You may have to go out of character mode to click something. It should work for either type of selection, game mode where you click a creature and get the circly thing, or edit mode and you have the edit tools


To exit the FxGUI, click the X button on your control bar. That is how you exit the system. When it says Exit without Saving click Yes

Debug as needed, and don't be afraid to experiment! To add your own Fx, just click Add. Once you have a new empty Fx, click the Spec Button on your control bar, and change the name to something that you will remember. Also add a description.

Naming conventions

For testing, it can be useful to use your own character name in the title.

Most of the existing ability fxs start with fx, but that was when we were limited to one name space.


To delete an item, click and hold down the mouse and drag it off the browser. You will get a popup: "Are you sure you want to delete?" Click "OK".


As you tweak an Fx, you can definitely preview it, but it is not saved to the server until you click SAVE


Open ASampleFx to see a saved version.

Fx Tool Tasks

Main page: Fx Tool Tasks

Fx Tool Tasks, are utilities which do their work on other tasks


An Attacher is used to attach one instance to another instance or character. With most 3d instance tasks, when it starts you can also choose to attach it to something. An FxAttacher is used when you need to attach something to something, at a time other than when it started.


Working correctly, a glowy particle effect should appear, and get attached to a different character bone on your character every 2 seconds.

It is fairly straightforward to setup. Specify AttachThis as the thing to attach, and AttachTo as the thing you want to attach it to

Note that an Attacher only has a WhenToStart event, no WhentoStop. This is because it does its job instantaneously

If you set AttachRelative to true, then the object that will be attached maintains its current position relative to the thing it is about to be attached to. So if you had an eyeball on the ground behind your character, and attached it to your character with AttachRelative to true, then the eyeball would remain behind your character as you run around, instead of changing positions to match my current position

To Detach something, use an Attacher and set its AttachTo to DEFAULT which means attach to nothing.

Note: If you try to attach something to a thing, but it's already attached to something else, the system automatically detaches it for you.


When you want to change the position, rotation or scale of something over time, you use a Transformer

Transformers can appear complex, because they have many options.

In the FxTransformer section, you specify what you are going to transform. This will be any 3d instance you've added to your Fx, or the special CASTER and TARGET names.

CASTER and TARGET are special. They can refer to any instance that your script system chooses to pass in to the Fx System, so they don't specifically mean your character and the character you have clicked on.

Transformations can be applied to caster or target.

Note that if you attempt to transform your own character, you'll get varied success, since the Fx System is entirely client-side, and some update come from the server:

So it is good to keep in mind that anything which the Fx System is moving around, is taking place only on the client. Things such as spells which appear on everyone's client, do so because we send a command to everyone's client to play that effect.

Note that if specify a Start Loc and a TargetLoc, these refer to the Position, and will be ignored if rotating or scaling. For an example, a developer could create two Tennis Rackets, and then create a tennis ball and transform the ball from StartLoc Racket1 to TargetLoc Racket2.

If either Loc is left at DEFAULT, then the Fx System uses StartPosition and TargetPosition.


This is where all the work happens.

There are three Ignore settings:

They are there simply to help simplify things. Click each of them to TRUE, to see how they work. IgnorePosition for example, when TRUE, means it will not change the position of the instance at all. It hides any fields that have to do with Position in the Transform3D section.


TransformArc is a specialized version of Transform3D, specifically made to move something in an Arc above the ground. You specify a start and target position, then tell it how high you want it to go, and that is all that's needed.


Faders can be used for effects like making floating skulls fade in and out

Whenever adding a Model, you have the option to change StartMethod to FadeIn and StopMethod to FadeOut

FadeIn will begin when the mesh starts

Fadeout will begin when the mesh stops

If you need to change the alpha (aka fade) of a mesh at any other time other than start or stop, you use a MeshFader

Drag a Fader from the Fx Toolbar down on top of Maiden to see its settings. It is similar to Transformer, because you can specify a curve, duration, repeatcount, reverse, and so far.


The FxAnimationCmd tool allows you to send a Behave command to a character. A Behave command makes a character play a particular animation, such as waving a sword, or yawning.

Most animations that can be played are linked to a MODE that the character is in. For example, to play the SpellcastGroundImpact anim, the character has to be in Combat mode, otherwise nothing happens.

There are various ways to learn which animation commands are possible. One technique is:

(check line numbers)

Synching special effects with an animation

Here, since we already known how to play an animation, we will cover how to synchronize special effects with certain parts of an animation, such as in our example when the character hits the ground.

Animation notes

Animation notes are little text notes that the Animator adds to the animation, to denote a particular significant point within the animation.

For instance a LeftFootDown note might appear in the walking animation. This would allow the sound developer to play a footstep sound at exactly that point

In the SpellCastGroundPoint animation, there is a note at the part of the animation when the fist is at its lowest point: *NOTE GROUND SLAM

To find out what notes exist in an animation:

(the quill method has been deprecated, use the right-click menu as listed in Animation notes)

Extending the Fx System

To add Fx functionality which does not yet exist, any Fx can be linked to a separate control script.

The EventOccurance shared function is the one that gets all the events. From there you could fire off more Fx's or many other things, based on the events from your Fx

The OnFxGroupPreStart function gets called before the Fx is played, passing in the Fx object with all the data about the Fx. There, you can make on the fly changes to alter the behavior of your Fx, basically allowing you to do anything else that has not already been added to the Fx system

See also

Caution: This page may contain information which is Hero's Journey-specific!


This can also be done with:


to get a list of bones for that character

Personal tools