kaos_hypnos Posted March 24, 2017 Share Posted March 24, 2017 so im doing a subzero and scorpion mod and i need to know if theres a wy to change their damage output while cold or while hot respectively but i havent been able to find anything in files that relate to a temperature modification of anything outside of overheat temp and freezing temp. has anyone here come across something like it or know where i could loo to find a solution? id like to be able to have subzero do more damage at a certain temperature as opposed to all winter and the same for scorpion for heat as opposed to all summer. any guidance on this would be a great help. thank you in advance Link to comment Share on other sites More sharing options...
CarlZalph Posted March 25, 2017 Share Posted March 25, 2017 @kaos_hypnos inst:ListenForEvent( "temperaturedelta", function(inst, data) local temperature_current = data.new local scaling_factor = 1.0 if temperature_current < 10 then scaling_factor = 2.0 end inst.components.combat.damagemultiplier = scaling_factor end ) You can do more advanced scaling using a custom math function for the scaling_factor such as linearly increasing damage from a temperature range, etc. This should be in the master_postinit callback for the character. Link to comment 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