CNCT Generation/New Element

  • CeeJayBee
    15th Jul 2015 Member 1 Permalink
    @DanielGalrito (View Post)
    <code>
    -- script goes here --
    </code>

    So if you put in:

    <code>
    local function Pste(i,x,y,s,nt)
    local collx = math.random(-1,1)
    local colly = math.random(-1,1)
    if tpt.get_property("type", x+collx, y+colly) == tpt.element('sand') then
    if tpt.get_property("tmp2", i) == 0 then
    tpt.delete(x+collx, y+colly)
    tpt.set_property("ctype","cnct",i)
    tpt.set_property("tmp2",1,i)
    tpt.set_property("life",1500,i)
    end
    end
    if tpt.get_property("tmp2", i) == 1 then
    if tpt.get_property("life", i) > 0 then
    tpt.set_property("life",tpt.get_property("life", i)-1,i)
    end
    end
    if tpt.get_property("tmp2", i) == 1 then
    if tpt.get_property("life", i) == 0 then
    tpt.set_property("tmp2",0,i)
    tpt.set_property("type","cnct",i)
    end
    end
    if tpt.get_property("type", x+collx, y+colly) == tpt.element('watr') or tpt.get_property("type", x+collx, y+colly) == tpt.element('dstw') then
    if tpt.get_property("tmp2", i) == 1 then
    tpt.set_property("life",1500,i)
    end
    end
    end
    tpt.element_func(Pste, tpt.element('pste'))
    </code>

    It would show up as:


    local function Pste(i,x,y,s,nt)
    local collx = math.random(-1,1)
    local colly = math.random(-1,1)
    if tpt.get_property("type", x+collx, y+colly) == tpt.element('sand') then
    if tpt.get_property("tmp2", i) == 0 then
    tpt.delete(x+collx, y+colly)
    tpt.set_property("ctype","cnct",i)
    tpt.set_property("tmp2",1,i)
    tpt.set_property("life",1500,i)
    end
    end
    if tpt.get_property("tmp2", i) == 1 then
    if tpt.get_property("life", i) > 0 then
    tpt.set_property("life",tpt.get_property("life", i)-1,i)
    end
    end
    if tpt.get_property("tmp2", i) == 1 then
    if tpt.get_property("life", i) == 0 then
    tpt.set_property("tmp2",0,i)
    tpt.set_property("type","cnct",i)
    end
    end
    if tpt.get_property("type", x+collx, y+colly) == tpt.element('watr') or tpt.get_property("type", x+collx, y+colly) == tpt.element('dstw') then
    if tpt.get_property("tmp2", i) == 1 then
    tpt.set_property("life",1500,i)
    end
    end
    end
    tpt.element_func(Pste, tpt.element('pste'))
    Edited 2 times by CeeJayBee. Last: 15th Jul 2015
  • schuylerwalker
    15th Jul 2015 Member 0 Permalink

    @12Me21 (View Post)

     Could you please explain what slime blocks are? (I don't play Minecraft)

  • Jokersona
    16th Jul 2015 Member 0 Permalink

    schuylerwalker:

    @12Me21 (View Post)

     Could you please explain what slime blocks are? (I don't play Minecraft)

     

    Slime blocks are blocks made of Slime, which are sticky, and bouncy. They can pull other blocks when moved by pistons.

  • 12Me21
    16th Jul 2015 Member 0 Permalink

    @schuylerwalker (View Post)

     When a slime block is pushed by a piston, all connected slime blocks (as well as other blocks touching the slime blocks) move as well. (they're also bouncy)

  • schuylerwalker
    16th Jul 2015 Member 0 Permalink

    @ChargedCreeper (View Post)

    Thanks.

    @12Me21 (View Post)

     Now knowing what you're talking about, yeah.

  • schuylerwalker
    15th Aug 2015 Member 0 Permalink

    Could someone make code for the reinforced concrete?