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

How to block player to pass in a tile where there's a player?

dervin13

Active Member
Joined
Apr 26, 2008
Messages
458
Solutions
1
Reaction score
28
Hi, anyone know a movement condition that block another player to try to go in sqm and it's not possible because there's a player in this sqm? thx
 
There is a tile called "glowing switch", commonly used infront of depot lockers, that makes you unable to walk through each other.
Is it what you're looking for?
 
movement script, that checks stepIn, and use getSpectators function to see if anyone is currently occupying the tile.
 
data/movements/movements.xml
Code:
<movevent event="StepIn" actionid="800" script="stepBack.lua" />

create in data/movements/scripts a file called stepBack.lua
Lua:
function onStepIn(creature, item, position, fromPosition)

    local tile = Tile(position)
    if tile:getCreatureCount() > 1 then
        creature:teleportTo(fromPosition, false)
    end
   
    return true
end

Now in map editor, put action 800 in tile that u want to pass only one player
 
Back
Top