PEALI - Electronics & Lua Integration

  • devast8a
    31st Jul 2011 Former Staff 0 Permalink
    PEALI - Powder Electronics and Lua Integration



    Download

    Instructions on how to use:
    - Download PEALI and place it into your Powder Toy folder and unzip.
    - Open up powder toy and open the save I linked above
    - Open up the console with the ~ key
    - Type dofile "peali/r"


    Image and video hosting by TinyPic
    Bridges are referenced by the X/Y coordinate of the leftmost particle (ie. the particle circled in red or blue).
    The NTCT (circled in red) for the read part of the bridge, METL (circled in blue) for the write part of the bridge.

    I'll refer to each of those pieces of METL/ISNL as bridges.
    The top bridge is for sending and receiving values from the script. (replace VOID with BTRY)
    The bottom bridge is for switching operations to perform. simply spark the METL above the VOID.
    The left most pin is x2, the next is x3. /2 then /3.
    - Please remember that NTCT takes a while to cool down so it may take a bit for the script to be able to recognize the correct input -


    ==================================
    Functions included in PEALI and how to use them in your own script.
    - Remember to include PEALI with: dofile "peali/peali.lua"
    - You will most likely want to run your script each frame with: tpt.register_step()

    peali.write( x, y, v ) - Write the value V onto the bridge at position X/Y.
    Returns true if value could be written to bridge, false otherwise.

    peali.read( x, y ) - Return a read value from a bridge at position X/Y.

    peali.num( x, y ) - Return the number of pins currently sparked at position X/Y.
  • jalfor
    31st Jul 2011 Member 0 Permalink
    Cool, I could imagine this being used to save space with electronics.
  • Vou
    31st Jul 2011 Banned 0 Permalink
    This post is hidden because the user is banned