Sigoles
Discord: @sigoles
- Joined
- Nov 20, 2015
- Messages
- 1,209
- Solutions
- 2
- Reaction score
- 154
I'm using this script to spawn monsters after died, onDeath event:
but The monsters are spawning in the same sqm that they died, but I want it to spawn in random positions.
PS. The spawn is not by RME, it's in startUP. The monsters are registered events.
I'm using tfs 1.3, whats wrong?
LUA:
local position = {
from = Position(31371, 32189, 7),
to = Position(30453, 32269, 7),
}
function onDeath(creature)
local randomPosition
addEvent(function()
randomPosition = Position(math.random(position.from.x, position.to.x), math.random(position.from.y, position.to.y), 7)
local monstro = Game.createMonster("Demon", randomPosition)
end, 100 * 1000)
return true
end
but The monsters are spawning in the same sqm that they died, but I want it to spawn in random positions.
PS. The spawn is not by RME, it's in startUP. The monsters are registered events.
I'm using tfs 1.3, whats wrong?