Modding Help Odd multiplayer interaction

Discussion in 'Starbound Modding' started by Oblivire, Feb 12, 2019.

  1. Oblivire

    Oblivire Big Damn Hero

    So I'm trying to make an script to boot a player out of an area by warping them back to their ship. That part is easy enough, through the Remote Interfaces mod and a dummy gui, but my issue is in the triggering of it. I made a chunk of code and tied it to the teleporter of a ship, designed to eventually boot the player out if they aren't of a certain race.
    Code:
    require "/scripts/rect.lua"
    require "/scripts/vec2.lua"
    
    --[[function init()
        box = object.boundBox()
        ll = rect.ll(box)
        ur = rect.ur(box)
    end]]
    
    function update(dt)
        --sb.logInfo(sb.print(ll))
        --sb.logInfo(sb.print(ur))
        --players = world.playerQuery(ll, ur) --Are any players in the bounding box?
        players = world.players()
        for i,v in pairs(players) do
            --sb.logInfo("Player Entity: "..v)
            sb.logInfo("Player Entity: "..sb.print(world.entityName(v)))
            sb.logInfo("Species: "..sb.print(world.entitySpecies(v)))
        end
    end
    I made this in an attempt to check if it could be done. But the odd interaction I'm getting, is that while the owner of the ship receives the logInfos just fine, if someone else joins to the ship they don't, even if they have the mod properly installed and et cetera. Have any of you lovely people experienced something like this and know of a workaround? I looked into adding a status effect to do it to the ship's biome, but they don't seem to have a biome...
     
  2. Cryptoid

    Cryptoid Pangalactic Porcupine

    Maybe add the status effect to the shipworld file? I don't know much about this.
     

Share This Page