muddykat

  • Content Count

    52
  • Joined

  • Last visited

 Content Type 

Profiles

Forums

Downloads

Klei Bug Tracker

Game Updates

Hot Lava Bug Reporter

Posts posted by muddykat


  1. in both cases in which i put the code in the mod main or the characters.lua but i get the same error that i have never had before 

     

    291: attempt to preform arithmetic on local 'dt' (a nil value)

     

    from this i already know its trying to access a variable that doesn't exist or is a well nil value

     

    i have no clue how i would fix this


    o here is the code for what im trying to do now

    local function dosundamage(inst, isday)	if not TheWorld.state.israining then		if not inst:HasTag("nosundam") then			if isday then		inst.components.health:DoFireDamage(.05, false, true)			end        end	endendlocal function onbecomevampire(inst)if TheNet:GetIsServer() then    inst:DoPeriodicTask(dosundamage(inst,TheWorld.state.isday),1) --your stuff with health etcend	inst.components.locomotor.walkspeed = 4	inst.components.locomotor.runspeed = 6end

  2. i'm a somewhat experienced Dont starve mod creator unfortunately the same cannot be said about don't starve together, i'm experiencing a problem with converting my mod Bellatrix the realistic vampire into don't starve together. I have managed to get it work but without any of the well "vampiry" stuff, so no burning in sunlight.

     

    i got the items to work same with the characters ghost and other bits and bobs to work except the sunlight thing, and that's were the periodic task comes into play.

     

    So my sunburn works really simply i have a periodic function that checks the clock and find if its day or not check if its raining and if i have any items equipped with the tag "nosundam" and if the requirements are checked i just do a health delta, but in don't starve together it seems that how i did the event it only seems to occur on the client side of things. Knowing this i'm afraid i'm going to have to make a component or something along those lines, but i'm not sure how i would implement something like that though.

     

    so that's what the problem i'm facing is there anyway to get around this or will i have to make a component or something else like that. i'm 95% positive that what i want to do is possible in some way shape or form because the character wx87 takes damage in the rain

     

    (i have gone through wx87's code and still to no avail)