View Issue Details

IDProjectCategoryView StatusLast Update
0003945The Dark ModFeature proposalpublic12.03.2015 19:20
ReporterSteveL Assigned ToSteveL  
PrioritynormalSeveritynormalReproducibilityN/A
Status resolvedResolutionfixed 
Target VersionTDM 2.04Fixed in VersionTDM 2.04 
Summary0003945: Allow func_emitters to fire one-shot particle effects on demand.
DescriptionFunc_emitters can be toggled on and off only if their particle effect is a cycling one. It would be good if they could also fire one-shot particle effects as a result of activation / targeting / script commands.

From forum thread: http://forums.thedarkmod.com/topic/16710-particle-request-candle-smoke/page__view__findpost__p__359521
Additional InformationTargeting and activating a func_emitter to turn it on and off is good only for cyclic particle effects, the ones that carry on chugging away forever. You can't trigger a one-off particle effect like candle smoke simply by activating the func_emitter. That's because func_emitters randomize themselves by setting a random time offset when they are activated. That is, they say something lilke, "My start time was 23.84536 seconds ago so calculate my particle quads from there". That's fine if the particle effect is a cycling one, but if it's a one-off effect you usually see nothing coming out, because the random time offset will usually be greater than the time the particle effect lasts. If your particle effect lasts 2 seconds and your triggered func_emitter decides randomly that it started 5.96789 seconds ago, you'll see nothing because the particle system will see that it's past its expiry date and draw nothing. If we change the func_emitter code to use shaderparm5 to randomize its quads instead of setting a time offset, then we'd be able to trigger one-shot particle effects.
TagsNo tags attached.

Activities

SteveL

SteveL

11.03.2015 23:13

reporter   ~0007460

Last edited: 11.03.2015 23:14

I've got this fixed up by simply restarting from scratch any particle effect that has non-cycling stages when it's triggered "on". So when triggered "off" the particle does nothing, when triggered "on" it fires. But having tried it in a test map, it looks like the best behaviour would be for perpetually *cycling* particles to be triggered on and off (as they are now), but for non-cycling particles to always fire when triggered. The on/off behaviour doesn't make much sense for particles that fire once then stop. For those, every other trigger event would result in no reaction. I'll ask in the editor's guild.

SteveL

SteveL

12.03.2015 18:39

reporter   ~0007462

The correct fix for this is to remove the code that randomizes particles using time offset, and substitute correct code that uses the "diversity" shaderparm instead. That's how every other particle effect achieves uniqueness, and it's clearly how the Activate() method and the existing "cycleTrigger" spawnarg were meant to work.

I'll also add editor documentation for "cycleTrigger" as its name isn;t self-explanatory at all.
SteveL

SteveL

12.03.2015 19:20

reporter   ~0007463

Rev 14255, func.def (DR documentation)
Rev 6477, emitter.cpp

Issue History

Date Modified Username Field Change
30.11.2014 01:20 SteveL New Issue
30.11.2014 01:20 SteveL Status new => assigned
30.11.2014 01:20 SteveL Assigned To => SteveL
11.03.2015 23:13 SteveL Note Added: 0007460
11.03.2015 23:14 SteveL Note Edited: 0007460
12.03.2015 18:39 SteveL Note Added: 0007462
12.03.2015 19:20 SteveL Note Added: 0007463
12.03.2015 19:20 SteveL Fixed in Version => TDM 2.04
12.03.2015 19:20 SteveL Target Version => TDM 2.04
12.03.2015 19:20 SteveL Status assigned => resolved
12.03.2015 19:20 SteveL Resolution open => fixed