Jump to content

HELP fixed

Recommended Posts

Help fixed, 

my character is not against the rain , umbrella does not work




local function dorainsparks(inst, dt)

    local mitigates_rain = false
    for k,v in pairs (inst.components.inventory.equipslots) do
        if v.components.dapperness then
            if v.components.dapperness.mitigates_rain then
                mitigates_rain = true
    if GetSeasonManager() and GetSeasonManager():IsRaining() and not mitigates_rain then
        inst.spark_time = inst.spark_time - dt

        if inst.spark_time <= 0 then
            inst.spark_time = 3+math.random()*2
            inst.components.health:DoDelta(-.5, false, "rain")
            local pos = Vector3(inst.Transform:GetWorldPosition())
            pos.y = pos.y + 1 + math.random()*1.5
            local spark = SpawnPrefab("sparks")


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

  • Create New...