Change conduction speed like GOLD?

  • RedVelvetCake
    30th Jul 2017 Member 0 Permalink

    Does anyone know how to make an element conduct electricity at a faster rate like how GOLD is slightly faster then METL?

  • DanielGalrito
    30th Jul 2017 Member 0 Permalink

    You make SPRK with ctype of that element create SPRK on a conductor a few pixels away on every direction, for example,

     

    function Gold(i, x, y, s, nt)

    rd = 4

    if sim.partProperty(i, "ctype") == tpt.element('gold') and sim.partProperty(i, "life") == 3 then

    sim.partCreate(-1, x+rd, y, elem.DEFAULT_PT_SPRK)

    sim.partCreate(-1, x-rd, y, elem.DEFAULT_PT_SPRK)

    sim.partCreate(-1, x, y+rd, elem.DEFAULT_PT_SPRK)

    sim.partCreate(-1, x, y-rd, elem.DEFAULT_PT_SPRK)

    end

    end

    tpt.element_func(Gold, tpt.element('sprk'))

    Edited once by DanielGalrito. Last: 30th Jul 2017
  • RedVelvetCake
    30th Jul 2017 Member 0 Permalink

    but im editing MY element not SPRK

  • DanielGalrito
    30th Jul 2017 Member 0 Permalink

    You want to edit the conduction speed of SPRK on that element, and the best way (I think) to do it is making that function for SPRK, if you make the function wait for the SPRK to go back to the element, it might get weird.