Jump to content

Struggling to get a minimap-related mod to work properly

Recommended Posts

I've managed to make all players reveal the minimap for all other players (provided they have the mod installed), however if they leave and rejoin they lose that information. I know that the minimap information is stored on the client (I had a friend check), which means that it isn't saving the information after a call to ShowArea.


Here's the entirity of the code section of my mod (all inside "modmain.lua"):

AddPrefabPostInit("world", function (inst)  inst:DoPeriodicTask(0.033, function ()    for k,player in pairs(GLOBAL.AllPlayers) do      local x,y,z = player.Transform:GetWorldPosition()      GLOBAL.TheWorld.minimap.MiniMap:ShowArea(x, 0, z, 30)    end  end)end)

I've tried both "world" and "world_network", both have the same result. This code works for what I want it to do (reveal the minimap around everyone connected), it just isn't saving it after the player leaves.


I've been scouring for the appropriate function for a couple hours now, is there something I've missed or is it not possible?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...