I am trying to create a function that when the player uses an item the monster will be immovable for a few seconds later will return to normalwhat do you mean?
tested it didn't workCheck this:
Creature:setNoMove
Hi,tested it didn't work
just doesn't work without errors in srv ..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.
Send the code u are using please.just doesn't work without errors in srv ..
I'm trying to do something in lua
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 gameSend 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())
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.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