Can somebody please? thread: Particles

  • TPT_PL
    1st Sep 2016 Member 1 Permalink
    Hey guys.
    I just want to make my particles (in lua) to move like NEUT, PROT, PHOT or ELEC.
    How do I do that? I tried many things (in-update variables, tmp) but none of them have worked.
    Help please?
    Edited once by TPT_PL. Last: 1st Sep 2016
  • DanielGalrito
    1st Sep 2016 Member 0 Permalink

    if tpt.get_property("tmp2", i) == 0 then
    local a = (math.random(360)-1) * 0.01745329;
    tpt.set_property("life",680,i)
    tpt.set_property("vx",2*math.cos(a),i)
    tpt.set_property("vy",2*math.sin(a),i)
    tpt.set_property("tmp2",1,i)
    end

     

    I found this in an example amde by jacob1 and I have been using it for all the energy particles I make.

  • TPT_PL
    1st Sep 2016 Member 1 Permalink
    Thanks!

    Edit: But why this doesn't work?
    Edited once by TPT_PL. Last: 1st Sep 2016
  • DanielGalrito
    1st Sep 2016 Member 0 Permalink

    Try using sim.pressure(x/4,y/4,pressure value).

  • jombo23
    1st Sep 2016 Member 0 Permalink

    i thought that air pressure stuff wasnt exposed to lua? or was that just air blocking

  • cxi
    1st Sep 2016 Banned 0 Permalink
    This post is hidden because the user is banned
  • TPT_PL
    2nd Sep 2016 Member 1 Permalink
    Will try that at home.
    Anyway, thank you.