Soapworm creator

  • LBPHacker
    19th Aug 2016 Developer 7 Permalink

    I think I might have seen something like this before, but for the love of TPT I can't seem to find it anywhere. Oh well, I wrote a Soapworm creator myself. It's available on the script server.

     

    It shows up as a new element called "SPWR" (Soapworm) in the Liquids section, with the same colour as SOAP. Draw a line of SPWR and you get a Soapworm. Simple as that. I'll try to link a GIF, hold on.

     

     

    EDIT: Three config options have been added, which can be modified from the console.

    • tpt.SPWR.spacing: Creates a soap waypoint from each N-th SPWR particles, kill the rest. The above GIF was created with spacing = 1. Defaults to 6, so it won't create toothpaste-like soapworms (like above) but nice, unfolded soapworms instead.
    • tpt.SPWR.bubbles: Connects the head and the tail of the new soapworm if they're close enough (in a 6-pixel radius of each other) if set to a truthy value.
    • tpt.SPWR.callback: Called (pcall, it's safe to set it to anything, errors are reported) whenever a SPWR particle is turned into a SOAP particle. The ID of the new particle is passed. Example:

    tpt.SPWR.callback = function(i) sim.partProperty(i, "dcolour", 0xFF000000 + math.random(0, 0xFFFFFF)) end

     

    EDIT: Added link to the version on the script server.

     

    EDIT: Example save (dunno why I hadn't linked this before)

     

    Edited 8 times by LBPHacker. Last: 6th Jul 2019
  • gunpowderTR
    20th Aug 2016 Member 0 Permalink

    nice!

  • jacob1
    22nd Aug 2016 Developer 0 Permalink
    So cool O_o

    I approved the version in your link (instead of the one on the script server) since it looks like you updated the script after submitting it.
  • PotatoGuy
    22nd Aug 2016 Banned 0 Permalink
    This post is hidden because the user is banned
  • LBPHacker
    25th Aug 2016 Developer 0 Permalink

    I'm glad you all like it. I'd like to make it so the bubbles it creates actually pop when one of their links is broken, but as far as I can tell, that only happens when life is 0 and that somehow prevents the creation of bubbles to begin with.

     

    I like how it's possible to add meta-elements such as SPWR to TPT. Maybe others have got other meta-elements in mind? The trick is to use the graphics_func and kill (or change-type) the particle immediately.

     

    Oh, yep, the one I'd submitted to the script server was a bit dated. Thanks for noticing, jacob1.

    Edited once by LBPHacker. Last: 25th Aug 2016
  • TheScienceKid
    10th Sep 2016 Member 2 Permalink

    OMG HOW DO I GET THIS I CANT FIGURE IT OUT ~(;3;)~

  • cxi
    11th Sep 2016 Banned 0 Permalink
    This post is hidden because the user is banned
  • TheScienceKid
    9th Oct 2016 Member 1 Permalink

    thank you :D