Particle systems and visibility

  • #1, by dos4gwSunday, 12. June 2016, 02:08 9 years ago
    I'm putting together a rather complex screen sequence that is very sensitive to timing. Objects and actions load quick enough when triggered, and so far nothing like that is affecting the timing of the sequence.

    However, particles are a different story. I need rain at one point in the sequence, but turning a condition to true for the object assigned to the rain creates a noticeable pause (animations, characters, and objects stop moving.) I've tried some trickery, such as turning the rain object on at the beginning of the sequence, hiding it behind a layer, then moving it past that layer's object center once I need rain, but that apparently doesn't work for particle systems.

    So, my question: Is it possible to make a particle system invisible/visible without using a condition trigger on an object?

    Thanks in advance.

    Newbie

    69 Posts


  • #2, by afrlmeSunday, 12. June 2016, 03:09 9 years ago
    If I remember correctly the particle system is a bit buggered at the minute - unless Simon fixed it for 4.2.5, but I'm sure he planned on fixing it for the new GUI version of the editor. I could be wrong though. Can you not add the rain as an animation temporarily for now? You could probably do it quite easy with a couple layers or so & move them down with Lua then snap them back to the start position. Rinse & repeat as needed. You could even create a few different frames to chuck a bit of dynamics into the mix.

    & to anwer your question: no, not to my knowledge. The only current method as far as I'm aware is by controlling the visibility of an object. Speaking of opacity... what happens when you decrease the visibility value of a scene object with a particle linked to it?
    game.CurrentScene.SceneObjects["test"].Visibility = 0
    -- or if that doesn't work...
    game.CurrentScene.SceneObjects["test"]:to(0, {Visibility = 0})
    

    Let us know what happens as I don't remember if I've tested that out before as I don't bother much with the particle system.

    Imperator

    7285 Posts

  • #3, by dos4gwSunday, 12. June 2016, 03:14 9 years ago
    That's definitely a possibility, though my animator may grumble. I'll test the above. Thanks!

    Newbie

    69 Posts

  • #4, by dos4gwSunday, 12. June 2016, 03:25 9 years ago
    Neither script affected the particle system assigned to the object. Ah well.

    Newbie

    69 Posts

  • #5, by afrlmeSunday, 12. June 2016, 03:55 9 years ago
    Neither script affected the particle system assigned to the object. Ah well.


    I guess they aren't affected by the opacity values of the scene objects then, only by the active / inactive state of the objects.

    Imperator

    7285 Posts