• 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!

RevScripts damage stepin

alcapone

Member
Joined
Jan 13, 2021
Messages
246
Reaction score
19
Lua:
local damagestepin = MoveEvent()

function damagestepin.onStepIn(creature, item, position, fromPosition)
    if creature:isPlayer() then
        local hit = creature:getMaxHealth() / 1
       creature:addHealth(-hit)
    end

    return true
end

damagestepin:type("stepin")
damagestepin:id(x)
damagestepin:register()


I'm trying to make that every time the player passes by the item he receives damage in life but when the player is in utamo the damage is going to utamo and not to life there is how even from utamo vita the player receives damage in his life
 
You would need to add storage or other option to player who should receive damage and edit whole ChangeHealth func in game.cpp
 
Back
Top