Explode into other material

  • derpyt
    14th Feb 2015 Member 0 Permalink

    Im trying to make it so that a material for example NITR explodes into another material like water or something. What is a good way to do this?

    Edited once by derpyt. Last: 15th Feb 2015
  • ThePowdertoygamer
    17th Feb 2015 Member 0 Permalink

    The closest you can get it nitr turning into water at a high temperature. There might be a way but i don't think it is possible.

  • Antares
    17th Feb 2015 Member 0 Permalink

    I think that you can do that the way explosives turn into EMBR and FIRE

  • derpyt
    17th Feb 2015 Member 0 Permalink

    @ThePowdertoygamer (View Post)

     Ok thanks anyway :)

  • QuentinADay
    17th Feb 2015 Member 0 Permalink

    I'm not really sure if this helps, but I made an element that explodes into another a while back:

     

     local a = elements.allocate("QUENTIN" , "EXPL")
    elements.element(elements.QUENTIN_PT_EXPL, elements.element(elements.DEFAULT_PT_BCOL))
    elements.property(elements.QUENTIN_PT_EXPL, "Name" , "EXPL")
    elements.property(elements.QUENTIN_PT_EXPL, "Description" , "Does Cool Stuff")
    elements.property(elements.QUENTIN_PT_EXPL, "MenuSection" , 5)
    elements.property(elements.QUENTIN_PT_EXPL, "Gravity" , 0)
    elements.property(elements.QUENTIN_PT_EXPL, "Falldown" , 0)
    elements.property(elements.QUENTIN_PT_EXPL, "Flammable" , 0)
    elements.property(elements.QUENTIN_PT_EXPL, "Explosive" , 1)
    elements.property(elements.QUENTIN_PT_EXPL, "Diffusion" , 0)
    elements.property(elements.QUENTIN_PT_EXPL, "Weight" , 100)
    elements.property(elements.QUENTIN_PT_EXPL, "Advection" , 0.1)
    elements.property(elements.QUENTIN_PT_EXPL, "AirLoss" , 0.95)
    elements.property(elements.QUENTIN_PT_EXPL, "Loss" , 0.15)
    elements.property(elements.QUENTIN_PT_EXPL, "Temperature" , 295.15)
    elements.property(elements.QUENTIN_PT_EXPL, "HeatConduct" , 255)
    elements.property(elements.QUENTIN_PT_EXPL, "MenuVisible" , 1)
    EXPLUpdate = function(i, x, y, s, n)
    local clife = tpt.get_property('life', x, y)
    if clife > 1 then
    for cx = -1, 1, 2 do
    for cy = -1, 1, 2 do
    tpt.create(x + cx, y + cy, 'stne')
    sim.pressure(x/4, y/4, 40)
    end
    end
    tpt.set_property('life', clife - 1, x, y)
    elseif clife == 1 then
    tpt.set_property('type', 0, x, y)
    elseif s > 0 then
    for cx = -1, 1, 2 do
    for cy = -1, 1, 2 do
    if tpt.get_property('type', x + cx, y + cy) == 4 or tpt.get_property('type', x + cx, y + cy) == 49 then
    tpt.set_property('life', 100, x, y)
    return true
    end
    end
    end
    end
    end
    tpt.element_func(EXPLUpdate, tpt.element('expl'))

    I hope it helps some...

    Edited once by QuentinADay. Last: 17th Feb 2015