Short Script Big Reaction

  • QuentinADay
    27th Jun 2014 Member 1 Permalink

    function explode(i,x,y,s,n)
    tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'thdr')
    tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'hygn')
    end
    tpt.element_func(explode,tpt.el.hygn.id)

     

    Place hygn anywhere on screen

  • bowserinator
    27th Jun 2014 Member 0 Permalink

    Make a for loop (maybe 10 times?) that runs the code and set the math.random(-1,1) to math.random(-5,5) 

    and add tpt.create(x+math.random(-5,5),y+math.random(-5,5),'thrm')

     

    Then place hygn anywhere on the screen. 

  • QuentinADay
    27th Jun 2014 Member 0 Permalink

    I'm very new to this so I'm not sure what you mean...

  • bowserinator
    27th Jun 2014 Member 0 Permalink

    ok... then copy the code over and over like this:

    function explode(i,x,y,s,n)

    tpt.create(x + math.random(-5,5), y + math.random(-5,5), 'thdr')
    tpt.create(x + math.random(-5,5), y + math.random(-5,5), 'hygn')
    tpt.create(x + math.random(-5,5), y + math.random(-5,5), 'thrm')
    tpt.create(x + math.random(-5,5), y + math.random(-5,5), 'thdr')
    tpt.create(x + math.random(-5,5), y + math.random(-5,5), 'hygn')
    tpt.create(x + math.random(-5,5), y + math.random(-5,5), 'thrm')

    tpt.create(x + math.random(-5,5), y + math.random(-5,5), 'thdr')
    tpt.create(x + math.random(-5,5), y + math.random(-5,5), 'hygn')
    tpt.create(x + math.random(-5,5), y + math.random(-5,5), 'thrm')

    tpt.create(x + math.random(-5,5), y + math.random(-5,5), 'thdr')
    tpt.create(x + math.random(-5,5), y + math.random(-5,5), 'hygn')
    tpt.create(x + math.random(-5,5), y + math.random(-5,5), 'thrm')

    tpt.create(x + math.random(-5,5), y + math.random(-5,5), 'thdr')
    tpt.create(x + math.random(-5,5), y + math.random(-5,5), 'hygn')
    tpt.create(x + math.random(-5,5), y + math.random(-5,5), 'thrm')

    tpt.create(x + math.random(-5,5), y + math.random(-5,5), 'thdr')
    tpt.create(x + math.random(-5,5), y + math.random(-5,5), 'hygn')
    tpt.create(x + math.random(-5,5), y + math.random(-5,5), 'thrm')

    tpt.create(x + math.random(-5,5), y + math.random(-5,5), 'thdr')
    tpt.create(x + math.random(-5,5), y + math.random(-5,5), 'hygn')
    tpt.create(x + math.random(-5,5), y + math.random(-5,5), 'thrm')

    end

     

    tpt.element_func(explode,tpt.el.hygn.id)