guiismiti
Well-Known Member
- Joined
- May 19, 2014
- Messages
- 315
- Solutions
- 3
- Reaction score
- 68
Hello
It looks like removeCondition(CONDITION_DROWN) is not working
This is the movement code for the ocean floor tiles
I've also tried to use
and
Does anybody know what's wrong?
Thanks in advance.
It looks like removeCondition(CONDITION_DROWN) is not working
This is the movement code for the ocean floor tiles
Code:
local condition = Condition(CONDITION_DROWN)
condition:setParameter(CONDITION_PARAM_PERIODICDAMAGE, -20)
condition:setParameter(CONDITION_PARAM_TICKS, -1)
condition:setParameter(CONDITION_PARAM_TICKINTERVAL, 2000)
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
if math.random(10) == 1 then
position:sendMagicEffect(CONST_ME_BUBBLES)
end
player:addCondition(condition)
end
function onStepOut(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return false
end
player:removeCondition(CONDITION_DROWN)
end
I've also tried to use
Code:
player:removeCondition(Condition(CONDITION_DROWN))
Code:
player:removeCondition(condition)
Does anybody know what's wrong?
Thanks in advance.