Jump to content

furyan

Members
  • Posts

    8
  • Joined

  • Last visited

furyan's Achievements

0

Reputation

  1. I figured out my issue. When pulling the coordinates from Sector():getCoordinates the values returned are exploded! example: local x, y = Sector():getCoordinates() I'll get the command updated!
  2. Sorry, I broke the script last night doing some testing. This current gist should allow you to set the sector: https://gist.github.com/furyanPDX/1c4cb9956196c2994345fbc8f6136e81
  3. I really appreciate the help! For some reason when I assign Sector():getCoordinates() to a variable I get the error "attempt to index a nil value". Any idea why? I updated the gist here: https://gist.github.com/furyanPDX/1c4cb9956196c2994345fbc8f6136e81
  4. I see now! I just realized the whole object context thing. So the Sector():getCoordinates() method should return the sector coordinates for the player who ran the command?
  5. Sorry I meant to say that this would be in the context of a server command. onSectorEntered doesn't apply there I don't think.
  6. I was gazing at the documentation in search of a way to get the player's current sector, but was unable to find one. Is there already method available in the API? Something like Player():getCurrentSector()?
  7. Thanks for the feedback Kane! We're working on the station ui portion of the mod, but here is a command I put together in the meantime! Here is the gist of the script: https://gist.github.com/furyanPDX/1c4cb9956196c2994345fbc8f6136e81 Here is the repo that I'll be storing the commands in: https://github.com/FederationOfEngineers/Commands
  8. Hey! For those who like to copy pasta code. Here are the modifications you'll need to make and the mod script he added. Part 1: Modify: Add player:addScriptOnce("mods/setPreviousSectorAsHomeSector.lua") after player:addScriptOnce("story/spawnadventurer.lua") function onPlayerLogIn(playerIndex) local player = Player(playerIndex) Server():broadcastChatMessage("Server", 0, "Player %s joined the galaxy"%_t, player.name) player:addScriptOnce("headhunter.lua") player:addScriptOnce("eventscheduler.lua") player:addScriptOnce("story/spawnswoks.lua") player:addScriptOnce("story/spawnai.lua") player:addScriptOnce("story/spawnguardian.lua") player:addScriptOnce("story/spawnadventurer.lua") player:addScriptOnce("mods/setPreviousSectorAsHomeSector.lua") matchResources(player) end Part 2: Mod File Path: Contents: function initialize() Player():registerCallback("onSectorLeft", "onSectorLeft") end function onSectorEntered(playerindex, x, y) Server():broadcastChatMessage("Server", 0, "Handler hit") Player():setHomeSectorCoordinates(x, y) end Try not to upset The AI with your modding...
×
×
  • Create New...