Maxsar

  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

1 Neutral

About Maxsar

  • Rank
    Junior Member
...

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Enable
  1. Ok it doesnt save values after server restart. What ma i doing wrong this time? xD edit. fixed it.
  2. OMFG IM DUMB THANK YOU!!!!!! I WAS FIGTHING THIS FOR A WEEK NOW Q.Q THANK YOU SO MUCH
  3. maybe try that local NIGHTVISION_COLOURCUBES = { day = "images/colour_cubes/day05_cc.tex", dusk = "images/colour_cubes/dusk03_cc.tex", night = "images/colour_cubes/ruins_light_cc.tex", full_moon = "images/colour_cubes/purple_moon_cc.tex", } local function NightVision(inst, enable) if TheWorld.state.isnight or TheWorld:HasTag("cave") then inst.components.playervision:ForceNightVision(true) inst.components.playervision:SetCustomCCTable(NIGHTVISION_COLOURCUBES) else inst.components.playervision:ForceNightVision(false) inst.components.playervision:SetCustomCCTable(nil) end if TUNING.NIGHT_VISION == false then inst.components.playervision:ForceNightVision(false) inst.components.playervision:SetCustomCCTable(nil) end end it works for me
  4. Ok so what you changed. Code would be usefull!
  5. Yea im working on same thing and its really frustrating. :c edit. good idea is to take mods that have that implemented and try to understand it but its really hard. like these: https://steamcommunity.com/sharedfiles/filedetails/?id=1427073707 https://steamcommunity.com/sharedfiles/filedetails/?id=2304170675
  6. So i added custom component to character and its crashing when: i enter cave i load existing world - creating new world is fine but when i disconnect and resume it teleports my character to some random spot and after few seconds crash server. here is code for component: --blood.lua local Blood = Class(function(self, inst) self.inst = inst self.max = 100 self.current = 0 end) function Blood:OnSave() return {currentblood = self.current} end function Blood:OnLoad(data) if data.currentblood then self.current = data.currentblood self:DoDelta(0, true) end end --Ustawia aktualna wartosc bloodpoints function Blood:SetCurrent(amount) self.current = amount end function Blood:GetCurrent() return self.current end return Blood and i add component to character this way inst:AddComponent("blood") its probably something with saving or loading, maybe? idk