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 https://forums.kleientertainment.com/forums/topic/65628-help-fixed/ Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now