Particles before the scene load

  • #1, by PaupasiaTuesday, 07. February 2017, 18:47 7 years ago
    Some questions about Particle System grin

    - I have a few scenes where it snows. Is it possible to do so when the scene is loaded the snow is already fully visible?
    In this way I would avoid the loading time of the particles in the scene making everything more realistic.
    The new function ' warmup ' allows this?

    - Can I assign a particle at multiple scenes to be loaded once?

    - Is it possible to create a random system of particles?
       For example, every 10 minutes of the game make it rain and then after 10 minutes stop the rain?

    So many questions I know  grin


    Forum Fan

    165 Posts


  • #2, by AkcayKaraazmakTuesday, 07. February 2017, 19:04 7 years ago
    Great question smile

    Great Poster

    440 Posts

  • #3, by afrlmeTuesday, 07. February 2017, 20:05 7 years ago
    There's quite a few fields in the data structure related to the particle system, so I assume you should be able to tweak things with Lua script to do with x particle system & which particle systems are linked to which scene & which are active or inactive, etc. I'm not too savvy on the particle system (yet) as I've not had much cause to delve into it, but I will probably get around to it at some point - so this is about all the information I can offer. I guess only Simon or maybe Alex can offer the full details on what is actually possible.

    Imperator

    7278 Posts

  • #4, by PaupasiaWednesday, 08. February 2017, 03:32 7 years ago
    I guess only Simon or maybe Alex can offer the full details on what is actually possible
    I hope so   grin

    Forum Fan

    165 Posts

  • #5, by PaupasiaThursday, 09. February 2017, 18:54 7 years ago
    While waiting for help from the developers I have solved part of my post.
    As I hoped, the "warmup" Tab takes to preload of the particles and setting the "warmup" to about 170 the rain fills the entire screen when the scene is loaded.

    About the second question, I know that by connecting the Particles to an object in the scene automatically loads the desired effect.
    This is perfect for new scenes in which to place a empty object linked to a condition and then activated as desired.
    But do this for say 150 old scenes is panic.

    I thought to get around the problem by inserting an automatic command within an interface (like at beginning of scene) that I could recall very easily within the game, but I don't know how to do to not weighing it down.

    The best would be to invoke the object particle by a command in Lua like you use for any other object type, for example local getInterface = getObject (' Interfaces [inventory] ') where instead of interface there is Objectparticlesystem but I have no idea how to do it. 



    Forum Fan

    165 Posts

  • #6, by afrlmeThursday, 09. February 2017, 19:37 7 years ago
    Sorry. I'm not sure & according to the data structure neither scene particle system or object particle system is scriptable.

    There's also a mistake in the data strucute page in the wiki as objectparticlesystem says it's linked to particlesystem but we don't have a table for that - I assume it means particlecontainer which can contain multiple particle systems. If particles can be obtained with Lua script then I'm not sure if they would be done like so...
    Particles["example"]

    or...
    ParticleContainers["name"].ContainerParticles["name"]

    Imperator

    7278 Posts

  • #7, by PaupasiaThursday, 09. February 2017, 19:49 7 years ago
    Thanks a lot Lee,

    I've found here Vis 3.x  http://wiki.visionaire2d.net/index.php?title=Data_Structure_...

    that the table is "particlescontainer"
    the Field "ParticleContainerParticles"
    Field type  t_links to Particles (parent)
    Description "All particle emitters of this particle system."

    but not scriptable.
    Unfortunately the script don't work, but thanks again for your reply grin

    Forum Fan

    165 Posts

  • #8, by afrlmeThursday, 09. February 2017, 20:21 7 years ago
    That's the old wiki. In regards to not scriptable... just because it says it isn't scriptable, doesn't mean that it isn't. Sometimes it just means that the updated data doesn't get stored in the save game files. Sometimes though they aren't scriptable or require the scene to be reloaded before changes will take effect. Bit of a guessing game half the time. razz

    Imperator

    7278 Posts

  • #9, by PaupasiaThursday, 09. February 2017, 22:53 7 years ago
    Lol I'll wait for the new wiki and the new Lua functions to see if something is changed grin

    Forum Fan

    165 Posts

  • #10, by afrlmeThursday, 09. February 2017, 23:04 7 years ago
    Lol I'll wait for the new wiki and the new Lua functions to see if something is changed grin
    I doubt you will see much change in the data structure page. The new functions will likely be added to the player functions wiki page - well, when Simon gets round to sorting out some examples.

    Imperator

    7278 Posts