My moving dmnd and Clne script without lag

  • Dawgie
    20th Mar 2012 Member 1 Permalink
    Well i'm kinda new to the scripting scene but here is a script that makes dmnd and clne move upwards

        tpt.el.gbmb.name="MOVS"
        tpt.el.gbmb.description="Moves DMND and CLNE"
        tpt.el.gbmb.color=0x6BFFBC
        tpt.el.gbmb.weight=1e100
        tpt.el.gbmb.menusection=9
         if typeel==tpt.el.ice.id then
        tpt.parts[i].typeel=tpt.el.ice.id
        math.randomseed(os.time())
        function growth(i,x,y,s,n)
        typeel=tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
        end
        end
        
        tpt.element_func(growth,tpt.el.gbmb.id)
     

    You'll find it in your special tab and it has a little lag not much though
  • SkinnySatinTiger
    20th Mar 2012 Member 0 Permalink
    Edited once by SkinnySatinTiger. Last: 3rd Oct 2022
  • boxmein
    20th Mar 2012 Former Staff 0 Permalink
    For if you don't know, a "codebox" is created by adding <pre> before your code, and
    </pre> after your code.
    The pre tag is for "preformatted text" and it turns your code into a monospaced font, in the TPT case it also adds a box behind the text.
    Pastebin, Pastie, et cetera are very useful if you want to show off large amounts of code to other people (With syntax highlighting!).
  • mniip
    20th Mar 2012 Developer 0 Permalink
    Well, i always used [code]
  • jenn4
    20th Mar 2012 Member 0 Permalink
    @mniip (View Post)
    That's bbcode, not HTML.
  • boxmein
    20th Mar 2012 Former Staff 0 Permalink
    Both are supported though here.
  • Plasmoid
    2nd May 2012 Member 0 Permalink
    Clone and MOVS is weird.