Goregonzola Posted January 8, 2021 Share Posted January 8, 2021 Hey! I've been recently working on a character, that would start with a constant Health drain curse (inst.components.health:StartRegen(-2, 3)). He has additional ways to heal himself. My question is, is it possible, and if so, how can I make my custom "Cure Potion" item cure this curse for the rest of the game (alias remove the Health drain)? Is there such coding for something similar? How should I approach this? Thanks in advance! Link to comment https://forums.kleientertainment.com/forums/topic/125847-help-make-a-certain-food-remove-a-character-perk/ Share on other sites More sharing options...
Thomas_klei Posted January 8, 2021 Share Posted January 8, 2021 Very simple way is to have a periodic task to act as the healthregen and have a requirement to not have a tag for it to work so the cure potion would just add a tag when eaten 1 Link to comment https://forums.kleientertainment.com/forums/topic/125847-help-make-a-certain-food-remove-a-character-perk/#findComment-1414612 Share on other sites More sharing options...
Goregonzola Posted January 8, 2021 Author Share Posted January 8, 2021 @thomas4846 Thanks for the tip! Does the game remembers that the tag is added even when the character gets resurrected/goes in-or-out of the caves/quits and rejoins/etc.? Link to comment https://forums.kleientertainment.com/forums/topic/125847-help-make-a-certain-food-remove-a-character-perk/#findComment-1414614 Share on other sites More sharing options...
Thomas_klei Posted January 8, 2021 Share Posted January 8, 2021 Probably not, should just save it and load it using a onsave and onload function, should come with the template Link to comment https://forums.kleientertainment.com/forums/topic/125847-help-make-a-certain-food-remove-a-character-perk/#findComment-1414768 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