Make effects persist through death?
Make effects persist through death?
I'm trying to make an effect that does not normally persist through death (similar to dedication and reraise) do exactly that. Can anyone please help me out with how and where I'd do that?
Re: Make effects persist through death?
You just named two things that do, perhaps look to see how those work?
-- Whasf
Re: Make effects persist through death?
https://github.com/DarkstarProject/dark ... s_effect.h
unset the flags in status_effects table
unset the flags in status_effects table
Click here for a guide on scripting missions.<Giblet[NewBrain]> kj with this first step would be fine on my shit
Re: Make effects persist through death?
I made a custom quest that had players retrieve something in a time limit with all sorts of status effects applied. Just added various conditions to each individual status effect lua file. This way, it persisted through death, zone, you name it, as long as variable for quest was true and timer remained. Even disabled manual removal via spell/item.
Can get pretty creative with many other things as well.
Can get pretty creative with many other things as well.
Re: Make effects persist through death?
Found an example:
Keep in mind, this is specific to my quest. I add Confrontation to the player and use that as a control check for my reapplication of poison. In your case, you'd use a different method.
File Location: scripts/globals/effects
Keep in mind, this is specific to my quest. I add Confrontation to the player and use that as a control check for my reapplication of poison. In your case, you'd use a different method.
File Location: scripts/globals/effects
Code: Select all
-----------------------------------
--
-- EFFECT_POISON
--
-----------------------------------
require("scripts/globals/status")
-----------------------------------
-- onEffectGain Action
-----------------------------------
function onEffectGain(target,effect)
target:addMod(MOD_REGEN_DOWN, effect:getPower())
end
-----------------------------------
-- onEffectTick Action
-----------------------------------
function onEffectTick(target,effect)
end
-----------------------------------
-- onEffectLose Action
-----------------------------------
function onEffectLose(target,effect)
target:delMod(MOD_REGEN_DOWN, effect:getPower())
local status = player:getVar("Quest_Cure_Ails_You")
if (status >= 8 and status <= 16) then
local timeRemain = player:remainingEffect(EFFECT_CONFRONTATION)
if (timeRemain > 0) then
player:addStatusEffect(EFFECT_POISON,3,0,timeRemain)
end
end
end
Re: Make effects persist through death?
whasf wrote:You just named two things that do, perhaps look to see how those work?
I did have them both open and was looking, for the record!!!
The flag in the sql file is what I needed. Thanks guys