• Content Count

  • Joined

  • Last visited

Community Reputation

2 Neutral

About Ghost_starved

  • Rank
    Junior Member

Recent Profile Visitors

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

  1. I can somehow increase the damage to the character against a specific monster? . (Example if possible)
  2. Hello everybody ! I have a question about modding I have my character, and there is a character from another mod, how should I make my character inspect a character from another mod to say something unique?
  3. I have a second one, but it just gives sanity and does not regenerate local function WebberSanityAura(inst) local x,y,z = inst.Transform:GetWorldPosition() local pt = inst:GetPosition() local range = 10 -- range of ability local SANITYREGAIN = 7 -- Amount of Sanity regained to Webber per tick local tagz = { "_combat"} local canttagz = {"structure"} local check = TheSim:FindEntities(pt.x,pt.y,pt.z, range, tagz, canttagz) for _,ent in ipairs(check) do if not and ent.prefab == "webber" then ent.components.sanity:DoDelta(SANITYREGAIN) if ent.components.combat then ent.components.combat:SuggestTarget(inst) end end end end local function maincheck(inst) if not and not inst:HasTag("playerghost") and not inst:HasTag("playermonster") then WebberSanityAura(inst) end end -- 1 time interval between every tick (seconds-ish, it's not 100% accurate) inst:DoPeriodicTask(2, maincheck, nil, inst) end can it be made regenerative?
  4. inst:AddTag("webberlovemyprettycharacter") Now on your modmain: local function IsMyPrettyCharacterNearby(inst) local x, y, z = inst.Transform:GetWorldPosition() local num_char = #GLOBAL.TheSim:FindEntities(x, y, z, 10, {"webberlovemyprettycharacter"}) -- Here I'm using a radius equal to 10 if num_char > 0 then inst.num_char=1 else inst.num_char=0 end return 0 -- num_char is 1 if there is at least 1 of yourcharacter nearby, else is 0 end local function CustomSanityFn(inst, dt) return inst.num_char*500 -- a lot of sanity end AddPrefabPostInit("webber",function(inst) inst.num_char=0 inst._update_character_sanity_task = inst:DoPeriodicTask(3, IsMyPrettyCharacterNearby) -- One verification every 3 seconds inst.components.sanity.custom_rate_fn = CustomSanityFn end)
  5. just a bug and disconnection of the game. (If you know, can you suggest the code instead of what I was given before?) Recovering the sanity of a webber if he is next to my character
  6. I was given the code by a good person and I am very grateful to him. But! it does not work if there are caves in the world and can this be eliminated (One of my friends said that we need to check the caves) how to make it?
  7. Can you tell me how you can add a check to the caves? When you start a server with caves and select a webber, the game breaks, but if you play without caves everything is fine
  8. Logs indicate error 223 lines (inst.components.sanity.custom_rate_fn = CustomSanityFn)
  9. Well, personally, it seems to me that this is not such a rude answer. I asked a lot on the forum where they gave me 1 answer and then there was a complete ignorance of my existence. I ransacked the entire steam workshop 2 times (this is not a joke) (this is how I wrote the character code) Regarding moding, I'm not a very experienced person, and that's all that remains to be done .-. However, I did not find any examples with this code. And this code with Walter is not clear enough. Anyway, I'm sorry if I offended you.
  10. I just love it when they answer me 1 time and then without acknowledgments of life