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

monster pause tfs1x

theduck

Member
Joined
Dec 6, 2018
Messages
246
Reaction score
20
Is it possible to make a function that when executed the monster 'name' is still for a few seconds?
 
Hi,
You compiled your sources after the changes? Im using this function in my server and is working Ok... Have some error? What dont worked? Give more info and i try to help you.
just doesn't work without errors in srv ..
I'm trying to do something in lua
 
Send the code u are using please.
In lua you can set the speed of the monster to 0, then it will not move.
myMonster:changeSpeed(-myMonster:getSpeed())
when the player clicks on the item the demon should stop walking for a few seconds demon is just an example will be a boss that only has 1 in the game

Code:
local monster = "demon"
  monster:setNoMove(false)

  addEvent(function(mid)
    Monster(mid):setNoMove(false)
    end, 3000, monster:getId())
 

  return true
end
 
when the player clicks on the item the demon should stop walking for a few seconds demon is just an example will be a boss that only has 1 in the game

Code:
local monster = "demon"
  monster:setNoMove(false)

  addEvent(function(mid)
    Monster(mid):setNoMove(false)
    end, 3000, monster:getId())


  return true
end
In this case, monster variable is a string. You can't access the userdata of the monster like this. Try search in area, look for the boss and get the userdata.
Look from startPosition to endPosition, get tile in each interation, get creatures in the tile, check if the creature is the boss that you want to stop and then stop it...
How works your boss room? This boss is unique? If yes, you can store the boss userData in a global variable when it was summoned, to avoid search in area...
 
Back
Top