User Tools

Site Tools


attribute_examples

This is an old revision of the document!


Examples

Lightpoint Man

Select some man unarmed class entity like Competitor and open it’s attributes.

  • Expand the Emitter 3Ditor section and check the Use object as emitter box.
  • Select emitter count 4.
  • For the first emitter select Emitter type lightpoint, then the Effect type Chemlight_Blue and Model selection leftfoot.
  • For the second emitter select Emitter type lightpoint, Effect type Chemlight_Green and Model selection lefthand.
  • For the third emitter select Emitter type lightpoint, Effect type Chemlight_Red and Model selection rightfoot.
  • For the fourth emitter select Emitter type lightpoint, Effect type Chemlight_Yellow and Model selection righthand.
  • Press OK.
  • Then from the Eden editor’s Intel change the time so that it is dark.

Now you should see the lights glow on the entity on those selected positions, something like this:

The emitter icons will appear on the center/feet of the entity model regardless of selected selections. If you drag the entity around you will see that the lights nicely follow along.
Press Play Scenario and run around, the lights should follow the characters movements.

If you would export the scenario and play it it would do the same there. You can try that if you wish, save and export the scenario into SP scenarios, exit the editor and load the scenario from the scenarios list and play.
The same process works for particles, of course.

If you check the Use default emitter set box you will see that most of the attributes get disabled and the Link model selections and link die out get checked. The default set will appear as one, with the possibility for one model selection and one die out value, because it is a set.
You can name the individual emitters in the set though.
It also overrides any previous emitter attributes you have selected for the entity.

So, on that same entity as we did the lights (or just pick another one) check the Use default emitter set box and select some selection from the selection list. You can see how all the disabled attributes will also have the same selected selection in their selection list. This is because of the Link model selections is checked automatically.

Press OK.

NOTE that every time you change something the change has to be processed which causes a coffee mug progress indicator to show up.

Now you should see the previously mentioned warning about damage. Just click Continue and the emitter icon set is created at the feet of the soldier and the particles appear on the selection on the soldier model.

Press Play Scenario and you can see your guy is on fire and “he” soon perishes.

To remove the emitters open the attributes and un-check Use object as emitter and press OK, or you can delete them by selecting the emitter object (the “? in a box”) and pressing DELETE on your keyboard.
The default set behaves as one single emitter in this regard as well, so the whole set gets deleted.

Die out

To see how the Die out attribute works, set some entity to use the default emitter set as described above.
Try some wreck, like a boat wreck for example as it allows you to see the effects nicely.
Then type into the Die out attribute field the number 5.

Press OK.

You can place down a player entity to watch the flames with if you don’t have one placed already.
Press Play scenario and once the preview has started after five seconds (roughly, it takes some moments for the scenario to init) you will see the particles disappear.

Follow objectHide

Using the same entity as with the above example, give the entity some name, like foo.
Set the Die out back to 0, check the Follow objectHide box, and press OK.
If you didn’t place down player entity previously, do it now.
Press Play Scenario.

Open the debug console (ESC) and type in the Execute window:

[] spawn {
  while {true} do {
    sleep 3;
    foo hideObject true;
    sleep 3;
    foo hideObject false;
  };
};

Press Local Exec (or ENTER), then press ESC.
You can observe the boat disappearing and appearing back in 3 second intervals and the effect going out and starting up again with the boats hiding status.

So, for example when dynamic simulation hides the entity the particles also disappear, or if you hide the entity for any reason during your scenario, so no need to worry about that.

Of course the downside is that this spawns a looping script for each entity this is used on because there is no eventhandler to check if entity was hidden/shown…

attribute_examples.1638024443.txt.gz · Last modified: 2021/11/27 14:47 by hneg