LOLZ-like element help

  • PersonPlayingTPT
    13th Nov 2021 Member 0 Permalink

    I am trying to make an element that is like LOLZ, but I can't figure it out. Can you people help me? Here is my code:

     

    local element_id = elements.allocate("Things", "NO")
    elements.property(element_id, "Name", "NO")
    elements.property(element_id, "Colour", 0x212569)
    elements.property(element_id, "MenuVisible", 1)
    elements.property(element_id, "MenuSection", elem.SC_NUCLEAR)
    elements.property(element_id, "Enabled", 1)
    elements.property(element_id, "Advection", 0)
    elements.property(element_id, "AirDrag", 0)
    elements.property(element_id, "AirLoss", 0)
    elements.property(element_id, "Loss", 0)
    elements.property(element_id, "Collision", 0)
    elements.property(element_id, "Gravity", 0)
    elements.property(element_id, "Diffusion", 0)
    HotAir = 0.000 * CFDS
    Falldown = 0

    Flammable = 0
    Explosive = 0
    Meltable = 0
    Hardness = 0

    Weight = 10

    DefaultProperties.temp = 373.0
    HeatConduct = 40
    Description = "NO"

    Properties = TYPE_SOLID

    NO_RuleTable[9][9] =
    {
    {1,0,0,1,0,0,0,0,0},
    {1,1,0,1,0,0,0,0,0},
    {1,0,1,1,0,1,1,0,0},
    {1,0,0,1,1,0,0,1,0},
    {0,0,0,0,1,0,0,1,0},
    {0,0,0,0,1,0,0,1,0},
    {0,0,0,0,1,0,0,1,0},
    {0,0,0,0,1,0,0,1,0},
    {0,0,0,0,0,1,1,0,0},
    };

    elements.allocate("Things", "NO")[XRES/9][YRES/9];

     

    Help would be greatly apreciated. Thanks!

  • Hecker
    13th Nov 2021 Member 0 Permalink

    what coding lang?

  • Darkwrist
    13th Nov 2021 Member 0 Permalink

    @PersonPlayingTPT (View Post)

     Elements like lolz and love require special handling and the code for that is located in simulation.cpp

     

    So, I don't thing it's possible to make it work like lolz using a lua script.

  • PersonPlayingTPT
    12th Dec 2021 Member 0 Permalink

    Oh, thats too bad. Thanks for telling me anyways.

  • leandroczbr
    19th Jan 2022 Member 0 Permalink

    @PersonPlayingTPT (View Post)

     It is indeed possible using tpt graphics. look at this mod for more info (it's a lamp)

    https://starcatcher.us/scripts?view=20

    Edited once by leandroczbr. Last: 19th Jan 2022