icantevenname Posted March 4, 2018 Share Posted March 4, 2018 Is it possible to make a character die as soon as they're all wet? Link to comment Share on other sites More sharing options...
Aquaterion Posted March 4, 2018 Share Posted March 4, 2018 local function onmoisture(inst, data) if data.new == inst.components.moisture:GetMaxMoisture() or inst.components.moisture:GetPercent() == 1 then if inst.components.health and not inst:HasTag("playerghost") then inst.components.health:Kill() end end end inst:ListenForEvent("moisturedelta", onmoisture) Link to comment Share on other sites More sharing options...
icantevenname Posted March 5, 2018 Author Share Posted March 5, 2018 Jus' to make sure we're on the same page, the onmoisture is supposed to be out of the master_postinit while the ListenForEvent is in master_postinit, right? Link to comment Share on other sites More sharing options...
Aquaterion Posted March 6, 2018 Share Posted March 6, 2018 On 3/5/2018 at 2:20 AM, icantevenname said: Jus' to make sure we're on the same page, the onmoisture is supposed to be out of the master_postinit while the ListenForEvent is in master_postinit, right? yea Link to comment Share on other sites More sharing options...
icantevenname Posted March 8, 2018 Author Share Posted March 8, 2018 The "then" is there, it's just cut off. Link to comment Share on other sites More sharing options...
Aquaterion Posted March 10, 2018 Share Posted March 10, 2018 sorry for late response, change GetPercent to GetMoisturePercent 1 Link to comment Share on other sites More sharing options...
icantevenname Posted March 10, 2018 Author Share Posted March 10, 2018 Thanks a lot! 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