Making Elements like URAN and PLUT

  • ronansb
    14th January Member 0 Permalink

    I am looking into lua scripting for making elements, I am trying to add flerovium which is the same as URAN but explosive. I cannot find how to make it generate heat under pressure.

    Code:

    flrv = elements.allocate('ronan','flrv')
    elements.element(flrv, elements.element(elements.DEFAULT_PT_URAN))
    elements.property(flrv, "Name", 'FLRV')
    elements.property(flrv, "Description", "Flerovium, generates heat under pressure. Explosive.")
    elements.property(flrv, "Color", 0xD982B5)
    elements.property(flrv, "Flammable", 500)
    elements.property(flrv, "Explosive", 1)
    elements.property(flrv, "Properties", elements.PROP_RADIOACTIVE+elementsz.PROP_NEUTABSORB)

    UPDATE:

    i cannot get the pressure with lua and don't know C++ also i want the update function to do all elements of FLRV not just a single non-layered pixel

    NEVERMIND now i need to find out how to set a temperature with lua

    Edited 2 times by ronansb. Last: 14th January
  • RebMiami
    15th January Member 0 Permalink

    You can set temperature in Lua using sim.partProperty(i, "temp", ...) in the particle's update function. If you want a more complete reference on the functions avaulable, try checking out this page. The "Simulation" section has all of the functions that you'll probably need to create the behavior you're trying to make. Good luck!