antstubell Posted July 3, 2019 Share Posted July 3, 2019 So have a disease which slowly drains health. Only cure that I want to happen is for player to see a doctor. While all this slowly dying is happening I want there to be a harvestable plant - already made - which specifically treats, not cures, this disease. The plant's harvestable leaf grants relief from the health draining affect for say about an hour then the disease starts draining health again. I'm guessing along the lines of 'Well-Rested' or 'Gift Of Charity' perk or is it an ability? I'm not sure how to go about it.Help with my disease... please. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted July 4, 2019 Share Posted July 4, 2019 Use the harvested item to cure the disease and apply a different timed version of the disease that does not have the aspects that the harvested item is capable of relieving. Then when that effect runs its course, re-apply the original disease. I do not know how to actually do that but it seems to me to be the logical course of action. Link to comment Share on other sites More sharing options...
antstubell Posted July 4, 2019 Author Share Posted July 4, 2019 Things are going along nicely, disease is complete and temporary cure is done, as suggested the cure is just another 'effect'. The script - TimedAbilitySceipt - was a good find but is a bit lacking. I need the script to check that the player has a specific disease before applying a 'cure'. And after the time of the cure expires then the same disease has to return. Only cure for this disease is to see a doctor - yet to be created. So also need a way to maybe set a global variable when the player becomes infected with this particular disease and the 'cure' won't be applied unless the player has this disease. basically can you help me with this?Here is the TimedAbilityScript to save you searching for it... ScriptName TimedAbilityScript extends ActiveMagicEffectSpell Property pAbilityToRemove AutoInt Property pHoursToWait AutoEvent OnUpdateGameTime(); debug.trace(self + "OnUpdateGameTime")Game.GetPlayer().RemoveSpell(pAbilityToRemove)EndEventEvent OnEffectStart(Actor akTarget, Actor akCaster); start timerRegisterForSingleUpdateGameTime(pHourstoWait)EndEvent Link to comment Share on other sites More sharing options...
IsharaMeradin Posted July 4, 2019 Share Posted July 4, 2019 There is HasMagicEffect and HasMagicEffectWithKeyword that could be used to ensure that the player has the appropriate disease before curing. If the effect is timed, you can use OnEffectFinish as the trigger point to re-apply the initial disease. Link to comment Share on other sites More sharing options...
antstubell Posted July 4, 2019 Author Share Posted July 4, 2019 :thumbsup: Link to comment Share on other sites More sharing options...
Recommended Posts