DUKEK17 Posted March 21, 2016 Share Posted March 21, 2016 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 end end end if GetSeasonManager() and GetSeasonManager():IsRaining() and not mitigates_rain then inst.spark_time = inst.spark_time - dt if inst.spark_time <= 0 then --GetClock():DoLightningLighting() 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") spark.Transform:SetPosition(pos:Get()) end end end Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
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.