Earthyburt Posted December 6, 2020 Share Posted December 6, 2020 (edited) The code in question: inst:ListenForEvent("onhitother", function(inst) if inst.components.sanity <= 37 then inst.components.combat.damagemultipler = 0.5 else return end end) I have attached my entire prefab if needed wayne.lua Edited December 9, 2020 by Earthyburt Link to comment https://forums.kleientertainment.com/forums/topic/124500-solved-game-crashing-when-attacking-something/ Share on other sites More sharing options...
penguin0616 Posted December 6, 2020 Share Posted December 6, 2020 You should view/attach your crash logs. 1 Link to comment https://forums.kleientertainment.com/forums/topic/124500-solved-game-crashing-when-attacking-something/#findComment-1401912 Share on other sites More sharing options...
Thomas_klei Posted December 6, 2020 Share Posted December 6, 2020 3 hours ago, Earthyburt said: inst.components.sanity <= 37 Ur comparing a component rather than the components' current value 1 1 1 Link to comment https://forums.kleientertainment.com/forums/topic/124500-solved-game-crashing-when-attacking-something/#findComment-1401962 Share on other sites More sharing options...
Earthyburt Posted December 6, 2020 Author Share Posted December 6, 2020 22 minutes ago, thomas4846 said: Ur comparing a component rather than the components' current value Thank you Link to comment https://forums.kleientertainment.com/forums/topic/124500-solved-game-crashing-when-attacking-something/#findComment-1401977 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