particle effect on moving objects/characters

  • #1, by sebastianMonday, 25. April 2016, 21:33 4 years ago
    Hey there,

    is it possible to set particle effects on characters. And when they move, the particle moves with it?
    If yes, how do i achieve this?

    kind regards
    Sebastian

    Thread Captain

    2337 Posts


  • #2, by afrlmeMonday, 25. April 2016, 22:44 4 years ago
    According to the data structure, none of the particle stuff is scriptable. You can try scripting "ParticlePosX" & "ParticlePosY", but I can't say whether or not they will do anything.

    As for assigning a particle effect to a character... nope it's not possible to my knowledge, but having said that, let's consider that what I said above is actually possible then you would probably be able to update the position of the particle to the characters position by querying the characters position inside of a loop & then updating the particle position to that of the character - plus or minus an offset value.

    Imperator

    6846 Posts

  • #3, by sebastianMonday, 25. April 2016, 22:48 4 years ago
    Uff... What does mean "not scriptable" if i can change it via lua?

    Thread Captain

    2337 Posts

  • #4, by afrlmeThursday, 28. April 2016, 13:31 4 years ago
    It means whatever changes you make won't be stored in save files. Sometimes it does literally mean "not scriptable" as it requires you to reload the scene for changes to take effect - mostly though, it's just that the changes don't get saved when the player saves the game, so you would have to use conditions / values & if queries in an at begin of scene action to determine if what you did should be reapplied when the game is launched or a specific scene, etc is shown.

    Imperator

    6846 Posts

  • #5, by sebastianMonday, 02. May 2016, 22:40 4 years ago
    Hmm. But wouldnt it be possible to run a loop and set these positions directly all the time? The loop itself should be saved and by that would apply all coordinates, right?

    Thread Captain

    2337 Posts

  • #6, by afrlmeTuesday, 03. May 2016, 00:40 4 years ago
    no, the loop wouldn't be saved. You could store the positions inside of some vs values though, which would be saved. However I'm sure it said the position stuff for the particles isn't scriptable. You would have to try scripting it while game is running to see if the position can be updated or whether it requires a scene restart to update the position.

    Create a script inside of a key event (released) action or use the dev console (tab) & the exec command for testing the script.

    Imperator

    6846 Posts

  • #7, by sebastianTuesday, 03. May 2016, 08:21 4 years ago
    Oh, why doesn't a loop get saved?
    I have several things in my game which are looping all the time and i have no trouble when loading a savestate yet...
    Or is this some other kind of loop?
    What i did for example is a function which is hooked to the main loop in lua where several things are tested...

    (what would happen for actionpart loops after save/load a state?)

    I will test what you mentioned some time later... I was curious about if its lossible to make some moving, burning objects which smoke, etc...

    Kind regards
    Sebastian

    Thread Captain

    2337 Posts

Write post