detect if certain type of particle exist

  • TheAwesomeMutant
    15th Oct 2017 Member 0 Permalink

    i need to detect if FIRE exists in the simulation

     

    also is there a way to wait a certain amount of time?

    like say:

    wait(10)

    Edited once by TheAwesomeMutant. Last: 14th Oct 2017
  • Cracker1000
    15th Oct 2017 Member 0 Permalink
    @TheAwesomeMutant (View Post)
    If you are talking about the elements to be used then here is the method.
    You can use detc(fire) and set tmp2 to 25 (to maximise the range of detector).
    And use dlay and set temp to value that gives appropriate time to the signal generated by detector.
    If you are talking about the lua or coding than ask someone else.
  • DanielGalrito
    15th Oct 2017 Member 0 Permalink

    Try

    if sim.elementCount(tpt.element("fire")) > 0 then

     

    There should be a sleep function

  • zaccybot2
    15th Oct 2017 Member 0 Permalink

    I think I can guess why you are asking this. I know that on paper, sounds for things in the game seem like they would be cool, but I just don't think that it can ever really work well... 

  • jacob1
    15th Oct 2017 Developer 0 Permalink
    @zaccybot2 (View Post)
    It would be interesting to see how a sound mod works though. This is just a lua script. Although the final script is nothing like anyone would expect.
    Edited once by jacob1. Last: 15th Oct 2017
  • TheAwesomeMutant
    15th Oct 2017 Member 0 Permalink

    @DanielGalrito THANKS!!!

    @zaccybot2 its working!

    @jacob1 using lua of course!