Login / Registrieren
DE EN FR ES IT CZ
Zurück Nach oben

[Solved] Reduce particle

  • #1, by TinTin 8 years ago Zitieren
    Hi. How can reduce particle into the game slowly and put out? like raining to stop
  • #2, by SimonS 8 years ago Zitieren
    That's more complex:

    emitter = 10.0
    
    startTween("emitter", 10.0, 0.1, 10000, easeLinearIn)
    
    
    
    function onMainLoop()
    
    graphics.getParticles(game.CurrentScene.Objects.object).numberOfEmitted = {0.0,emitter}
    
    if emitter <= 0.1001 then
    
    unregisterEventHandler("mainLoop", "onMainLoop")
    
    end
    
    end
    
    
    
    registerEventHandler("mainLoop", "onMainLoop") 
    
  • #3, by TinTin 8 years ago Zitieren
    Thanks Simon.  Unfortunately it doesn't work for me. Or I'm somethings wrong 
  • #4, by SimonS 8 years ago Zitieren
    You need to change this: game.CurrentScene.Objects.object to your object,

    And the forum puts a <;= in there that should be <=
  • #5, by afrlme 8 years ago Zitieren
    Simon you can fix the issue with the code blocks by editing your post afterwards & just hitting the save button without changing it. It seems to correctly display the code block as intended, but if you edit again then it will likely insert the semi-colons again, so it's a case of rinse & repeat until it removes them - code blocks have always been a pain on the VS forum in one form or another.
  • #6, by TinTin 8 years ago Zitieren
    Thanks a lot Simon. It works perfectly