1.0.0.9 FXFields events

I am testing this cool new feature. 2 things :

  1. a strange behaviour :
    Admitting : [code]function MyFXField1Listener(event)
    local Particle = event.Particle
    local FXField = event.FXField
    if event.phase == “enter” then print(“PARTICLE ENTERED FIELD '”…FXField.name…"’") end
    if event.phase == “leave” then print(“PARTICLE LEFT FIELD '”…FXField.name…"’") end
    end
    Particles.AddFXListener(“MyField1”, MyFXField1Listener)

function MyFXField2Listener(event)
– nothing here
end
Particles.AddFXListener(“MyField2”, MyFXField2Listener)[/code]
The terminal returns :
"PARTICLE ENTERED FIELD ‘MyField1’
PARTICLE ENTERED FIELD ‘MyField2’ "

  1. a feature request
    In your code sample you give particle.scale modification based on - I presume- common object properties. Would it be possible to modify this particle velocity, or any particle parameters instead (and I don’t wish SetParticleProperty since it modified all particles) ?

[import]uid: 9328 topic_id: 6628 reply_id: 306628[/import]

1.) You are right, in the current version, each fx event is broadcasted to ALL fx listeners you define. We will address this in the next release.

Until then, you can either assign ID numbers to both, particles and FX Fields. The FX Field will ignore particles with another ID then.

As another workaround, you can also check the particle’s type within the fx event listener:

[lua]function MyFXListener(event)
if event.Particle.PType.name == “MyParticleType1” then

end
end[/lua]
2.) Particle properties like scale, position, rotation, alpha etc. are automatically calculated by Particle Candy (this is the main purpose of a particle system, otherwise it would be redundant) but we’ll eventually add a feature to detach certain particles from the processing chain at any given time so that they can be manipulated by your own. [import]uid: 10504 topic_id: 6628 reply_id: 23265[/import]

Unfortunately, the ID does not solve my case. It’s not a problem, I can wait for the next release, I have so many things to do …

Concerning assign ID, I remember this case :

  • 2 particles, 2 fields
    -> I did not managed to this : field 1 acts on both field, field 2 acts on one particle only. (setting multiple fxID to a particle could help) … don’t know
    [import]uid: 9328 topic_id: 6628 reply_id: 23273[/import]

You can assign one ID per field (as well as one ID per particle type). Having multiple IDs would further increase the processing power which would probably not be suitable for most other users unless there is a broad demand for it. This is always something we have to ponder about…

The issue you described above has already been fixed and will be included in the next update. If you need it asap, please email us, we’ll send you the latest version then. [import]uid: 10504 topic_id: 6628 reply_id: 23290[/import]

It’s ok, I think I can wait the update. Thx for your top notch support :slight_smile: [import]uid: 9328 topic_id: 6628 reply_id: 23457[/import]