Codelyy Posted August 2, 2015 Share Posted August 2, 2015 I'm wanting to add a feature to a character i am making where if the character's health goes below about 60 then their walk and run speed will be increased but i can't seem to figure out how to do it. (I'm new to this) Does anyone know how i can make this feature? Link to comment https://forums.kleientertainment.com/forums/topic/56725-increased-speed-on-low-health/ Share on other sites More sharing options...
Kzisor Posted August 2, 2015 Share Posted August 2, 2015 @codelyoko373,inst:ListenForEvent("healthdelta", function(inst) if inst.components.health.currenthealth < 60 then inst.components.locomotor:SetExternalSpeedMultiplier( inst, "lowhealth", 1.5 ) else inst.components.locomotor:SetExternalSpeedMultiplier( inst, "lowhealth", 1 ) endend Link to comment https://forums.kleientertainment.com/forums/topic/56725-increased-speed-on-low-health/#findComment-659546 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