[LUA] 4 VALUE PACKER! (beta)

incrazyboyy - Custom level - from iOS
PlayEdit5 players liked this.Log in to like this level.

My very first lua scripts!
The first script packs 4 independend values into 1, the other one unpacks them! In real-time with only a very small delay!

Usage example:
You have a car but want no ugly electronic parts so you use recievers and transmitters to place them remote. Configuring those transmitters and recievers is annoying and takes time! If you use these scripts, you only need to configure 2 instead of 8!!

And if anyone knows why the outputs are inverted on the left side, please tell me!

Views: 976 Downloads: 193 Unique objects: 11 Total objects: 99


Discuss this level

Log in to comment on this level.
  • PeterZ: Your level - packs 4 signals in to one
    Ctjet's level - packs 4 signals into one AND extracts them afterwards
  • incrazyboyy: @PeterZ: I don't know what you mean
    I compared the codes and they are working similar
  • PeterZ: @incrazyboyy: yeah, I've saw this one, but this one doesn't separate the signals afterward.
  • incrazyboyy: @PeterZ: here is the original one, look at the upload date
  • JOELwindows7: @incrazyboyy: yeah, whatever it is. Awesome!
  • incrazyboyy: @JOELwindows7: Thanks for the long explanation! I think you can use this in much of your levels! And I have another simple usage idea: use it in combination with the signal io1 parts between the 2 luas, for example to invert 4 values
  • incrazyboyy: @zardOz: thank you very much! :)
    Tell me when you've tested it!
  • JOELwindows7: Wow I explained the script so long :D
  • JOELwindows7: This is extremly useful as: Decrease Transmit/Reiciver frequency usage, Make the radio whatever it is., etc.
  • zardOz2: Actually now that I think on it, the 1.0 signal would be problematic.. Ill test it out.
  • zardOz2: This can be done on a single tick(two for accuracy) I think with some creative addition, subtraction and division. Nice job tho, it's accurate for most usages I would think.
  • JOELwindows7: Awesome!
    There're 4 input. These input are combined into 1 using tick-tick method, each tick fit an inputs. E.g. this tick fit IN0 then next tick is IN1 and so on as you can see on the grapher, this create grilling signals effect. That's how does the radio we had commonly work, yes! It fit the frequency, sound, image at the same time. Similar but in Principia can't do sam time merge on grapher. So that will flicker on Quad core, however this flicker can't be fixed that can't be realistic radio funtion. That's how the transmitter.
    Next is the Receiver, oppose from the first Lua, it will extract the signal that flicker and seperate them into available Outputs. Same as the first, but it extract. First tick in OUT 0 and next is OUT1 and so on.
    The tick of the receiver and the transmitter must be same select both otherwise it result weird image.
    You can inspire this to make your own TV, MoDem, Controller, etc. As I said before, this is laggy because Principia tick accuracy is .008 not as smooth. But yeah worth it.
    You invented the Radio again and in Principia. Awesome!!!! You are helpful! :D
  • incrazyboyy: @sjoerd1999: @TechZ: read the description again, I added an usage example
  • TechZ2124: @incrazyboyy: No problem, glad to help you ;)
  • incrazyboyy: @TechZ: thanks! and another thanks for the support! ;)
  • TechZ2124: Nice ;)
  • incrazyboyy: @sjoerd1999: thanks! :)
  • sjoerd19992: Very cool!!

LEVEL ID: 7928