Requiring a module / positional audio for mumble

Discussion in 'Starbound Modding' started by joeka, Dec 8, 2013.

  1. joeka

    joeka Tentacle Wrangler

    I can't use require in the lua scripts, this is deliberate I guess?

    I am trying to get positional audio for starbound in mumble.
    As I don't know how I could get the player location on client side, I created a new tech -> Now I have the location of my player, while he is using this tech.
    Stupidly without checking if I can use it later, I made a lua module from the Mumble Link c example (http://mumble.sourceforge.net/link).

    Does anyone know another way to do this?
    Would be cool, if the game could support this out of the box :)

    I haven't found a way to get some kind of id of the planet and the server address anyway, so you would hear people from some direction, even if they are on another planet or even server.
    And an id for the player would be necessary too ( maybe e.g. world.entityName(tech.parentEntityId()) ).


    EDIT:
    (No idea if this is interesting for anyone)

    lua module: https://github.com/joeka/luaMumbleLink

    What I wanted to do:
    Code:
    require "mumblelink"
    
    function init()
        initMumble()
    end
     
    function update(args)
        pos = tech.position()
        updateMumble ( world.entityName(tech.parentEntityId()), "SERVERNAME ( + PLANET? )", pos[1], pos[2], pos[1], pos[2] )
        return 0
    end
     
    Last edited: Dec 8, 2013

Share This Page