Extremely Heavy Peculiar Powder

  • DanDuncombe
    20th Oct 2013 Member 1 Permalink

    This is just an element I knocked up, which acts VERY oddly.

    It falls so fast it is almost invisible, and can fall through nearly everything.

    Because of these strange properties, other particles that isgoes through can be re-located in VERY odd ways!

     

    Code:

    local WEIGHT = elements.allocate("WEIGHT", "WGHT")
    elements.element(elements.WEIGHT_PT_WGHT, elements.element(elements.DEFAULT_PT_DUST))
    elements.property(elements.WEIGHT_PT_WGHT, "Color", "0xFCCFFF")
    elements.property(elements.WEIGHT_PT_WGHT, "Name", "WGHT")
    elements.property(elements.WEIGHT_PT_WGHT, "Description", "Extremely Heavy Powder")
    elements.property(elements.WEIGHT_PT_WGHT, "MenuVisible", 1)
    elements.property(elements.WEIGHT_PT_WGHT, "MenuSection", 7)
    elements.property(elements.WEIGHT_PT_WGHT, "Advection", 0)
    elements.property(elements.WEIGHT_PT_WGHT, "AirDrag", 0)
    elements.property(elements.WEIGHT_PT_WGHT, "AirLoss", 0)
    elements.property(elements.WEIGHT_PT_WGHT, "Loss", 200)
    elements.property(elements.WEIGHT_PT_WGHT, "Falldown", 2)
    elements.property(elements.WEIGHT_PT_WGHT, "Hardness", 0.8)
    elements.property(elements.WEIGHT_PT_WGHT, "Weight", 200000)
    elements.property(elements.WEIGHT_PT_WGHT, "Temperature", 293)
    elements.property(elements.WEIGHT_PT_WGHT, "HeatConduct", 0)
    elements.property(elements.WEIGHT_PT_WGHT, "State", 3)
    elements.property(elements.WEIGHT_PT_WGHT, "Properties", 2)

     

    Please Comment and say what you think!

  • zBuilder
    20th Oct 2013 Member 0 Permalink

    I noticed that when particles get to about 200 weight, they seem to fall through and displace anything they touch. XD

  • Nobody905
    21st Oct 2013 Member 0 Permalink
    Solids are at weight 100. I used this bug for the TRBM element in my mod.
  • DanDuncombe
    21st Oct 2013 Member 0 Permalink

    I don't think it is a bug.

    Also, from looking at the lua scripting api, I get the impression that solids are really powders, with no gravity like GRAV, and also unnaffected by air pressure. A Dev can correct me if I am wrong.

    This basically acts like warp with gravity, I think.

  • Nobody905
    22nd Oct 2013 Member 0 Permalink
    Solids have Falldown set to 0, so they act different. Also,you can make solids that are affected by pressure with the Advection property
  • Alexwall
    29th Oct 2013 Member 0 Permalink

    Heh breaks dmnd

  • damionfeller
    13th Nov 2013 Member 0 Permalink

    very ???... well i got no whay to explane it

  • jacob1
    13th Nov 2013 Developer 0 Permalink
    @DanDuncombe (View Post)
    We have 3 things that store state for some weird reason. There's FallDown (controls how particles move mostly), State (for some wall / portal / other random things), and Properties, which have properties like TYPE_SOLID, TYPE_ENERGY, etc. This one is used for some other random thing. When you set all 3 to the right thing you get the different states. If you do it wrong you might get a powder that goes through gas wall, I don't know. They really should be combined into maybe 2.

    Adding code to make sure even the heaviest elements don't go through solids won't happen, it's sort of intended. So keep using this "bug" :) You really only need a weight of 101 though.

    Also, it's good practice to use things like elements.TYPE_LIQUID instead of just 2 for properties, the properties might change sometime. If I go ahead with my plan to move TYPE_* into State, you will suddenly be giving your element a random unintended property. If you use TYPE_LIQUID though, i'll probably just set it equal to 0, so that old scripts that do it properly won't set an incorrect property. Also same with elements.SC_LIQUID instead of 7. If a new menusection is added this might suddenly find itself in gases.
  • damionfeller
    14th Nov 2013 Member 0 Permalink

    um what?

     

  • Antoine17
    7th Mar 2014 Banned 0 Permalink
    This post is hidden because the user is banned