Create particle every 2 secs help?

  • zBuilder
    6th Dec 2014 Member 0 Permalink

    so basically like this?

    http://pastebin.com/iu3wCLY4

  • DanielGalrito
    15th Dec 2014 Member 0 Permalink

    This is a good example and sorry if giving you the code wasn't what you wanted:

     

    elements.property(elements.DEFAULT_PT_URAN, "Properties", 0x6401)

    local function Radioactive(i,x,y,s,nt)
    local collx = math.random(-1,1)
    local colly = math.random(-1,1)

    if tpt.get_property("tmp", i) == 0 then
    tpt.set_property("life", 120, i)
    tpt.set_property("tmp", 1, i)

    end

    if tpt.get_property("tmp", i) == 1 then
    if tpt.get_property("life", i) == 0 then
    tpt.create(x+collx, y+colly, "neut")
    tpt.set_property("life", 120, i)
    end
    end
    end

    tpt.element_func(Radioactive, tpt.element('uran'))

     

    I still dont understand how to put the red box :P.

    Edited 6 times by DanielGalrito. Last: 15th Dec 2014
  • QuentinADay
    16th Dec 2014 Member 0 Permalink

    thanks for the help everyone! XD

  • PackedBread
    16th Dec 2014 Member 0 Permalink

    @DanielGalrito (View Post)

    click the thing on the bottom that says "html" (pic 1) then press enter and add a <code> before your code and </code> after your code (pic 2)! 

     

    pic 1: 

    pic 2: