CNCT Generation/New Element

  • Catelite
    6th Jul 2015 Former Staff 2 Permalink
    ..This is an amusing idea actually. I approve :O
  • DanielGalrito
    7th Jul 2015 Member 0 Permalink

    What if you just add Sand to PSTE, giving PSTE ctype CNCT and then after 500 frames the PSTE becomes CNCT, but if PSTE with ctype CNCT touches WATR or DSTW the countdown to turn into CNCT goes back to 500, this way it wouldnt need new elements.

  • schuylerwalker
    7th Jul 2015 Member 0 Permalink

    @DanielGalrito (View Post)

     Your idea is easier, but it doesn't take into account for the fact that sometimes you pour CNCT onto SAND to make a flat foundation. You also run the risk of having the PSTE turn into BRCK meaning it won't work. You have to have the new element to get around that problem.

  • DanielGalrito
    7th Jul 2015 Member 0 Permalink

    Want a Lua script of it?

  • schuylerwalker
    7th Jul 2015 Member 0 Permalink
  • DanielGalrito
    8th Jul 2015 Member 0 Permalink

    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 3 times by DanielGalrito. Last: 16th Jul 2015
  • schuylerwalker
    8th Jul 2015 Member 0 Permalink

    @DanielGalrito (View Post)

     Thanks!

     

    EDIT:

    Just ran it and it looks good! Would you be willing to try to make the new elements in Lua? (It took me a while to figure out why it wouldn't accept the file. I copied it into a program where it then removed the new line markers so it was a single line of code... with no spaces anywhere in the document.:( )

    Edited once by schuylerwalker. Last: 8th Jul 2015
  • DanielGalrito
    9th Jul 2015 Member 0 Permalink

    Yes, but which elements? The wet concrete?

    Edited once by DanielGalrito. Last: 9th Jul 2015
  • schuylerwalker
    9th Jul 2015 Member 0 Permalink

    @DanielGalrito (View Post)

     The wet concrete please. If you could do the others then even better.

  • 12Me21
    15th Jul 2015 Member 0 Permalink

    @schuylerwalker (View Post)

     (about RBCK) So, like slime blocks in minecraft? That would be cool