Things I'd like to be able to do with Lua

Discussion in 'Other' started by DaWrecka, Sep 23, 2017.

  1. DaWrecka

    DaWrecka Pangalactic Porcupine

    There's a couple of limitations in the scripting that have been frustrating me lately, and I know that if I don't say anything about them that nothing will change. So, here are three things (subject to future expansion) I'd like to be able to do with Lua in Starbound, but currently can't;
    1. Change a projectile's image directives mid-flight. Being able to make my flamethrower's projectiles fade out as they reach the end of their lifetime would be very nice, but also I'd like to be able to make a boomerang projectile whose size increases (and decreases) with its distance from the player. Neither of these are possible right now; the closest possibility involves killing a projectile and spawning a new one with the modified directives every time those directives change. Which could be as frequently as every frame. This is.. not exactly ideal.
    2. Change a projectile's collision poly mid-flight. Going back to the boomerang thing, having the projectile change in size purely in looks is pretty pointless; Unless the enlarged projectile is capable of hitting things with its increased size you might as well not bother.
    3. Spawn a projectile with a custom collision poly. Most of a projectile's default parameters can be overridden with a table when you call world.spawnProjectile(), but for some reason any custom collision polygon in that table goes completely ignored - the game will use the projectile's default collision polygon and screw you if you wanted something different.
    A new entry for the list came to me just now;
    • A "pan" image directive; Possibly need two directives, one for panX and another for panY. It would take the form of "?panx=<value>" or "?pany=<value>", and it would move the pixels of the image along the X or Y axis by the specified amount. For what I want to do, I'd want the pixels that have been moved off the end of the image to be replaced at the other end, but there may be good reason to make that a separate directive.
    Last edited: Oct 25, 2017
    Gniolliv and General Nuclear like this.

Share This Page