• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

C++ decay

theduck

Member
Joined
Dec 6, 2018
Messages
246
Reaction score
20
I created a pillar that uses it to rotate I'm using the decay function is working the problem is that sometimes the pillar starts to rotate very fast as if the decay had a shorter time


Code:
 local transformTo = {
    [36309] = 36310,
    [36310] = 36311,
    [36311] = 36312,
    [36312] = 36309
}

 

function onUse(player, item, fromPosition, target, toPosition, isHotkey) 
if isInArray(transformTo, item.itemid) then
            local pilar = transformTo[item.itemid]
            if pilar then
            item:decay()
                item:transform(pilar)
                item:getPosition():sendMagicEffect(CONST_ME_POFF)
            end 
     end
    return true
end

in items.xml
<attribute key="duration" value="900" />
 
Sorry for the delay, As the player needs to keep using the pillar until the mirrors are facing the boss, the 'addEvent' is accumulating.

put a exaust more did not help

image.png


I think a solution would be every time you click the addevent that is active to be turned off and started again would it be possible?
stopevent ()
bump
 
Back
Top Bottom