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

Solved Game.LoadMap + Adding spawns on map by lua

Nekiro

Legendary OT User
TFS Developer
Joined
Sep 7, 2015
Messages
2,684
Solutions
127
Reaction score
2,130
Hello guys, I need help again.

First question, does Game.LoadMap load spawns?

The problem is I want to add spawns by lua not in RME, something like "special spawn", only when special storage is active and the problem is I dont know how to add spawn like in RME with lua.
I know I can use Game.createMonster but it will not respawn the monster when it is killed.
 
you can see in my threads I ask for help to create a function "monster:setSpawnPosition(position)" then with it you can make the scripts...
pseudo
Code:
Game.loadMap(path)
for x = fromx, tox do
    for y = fromy, toy do
        local monster = Game.createMonster(monstername, Position(x, y, Z?), true, true)
        monster:setSpawnPosition(Position(x, y, Z?))
    end
end
then the function will add this to the "table" of respawns on your server
 
Thank you very much guys, already searched the forum, should do it first tbh.

Solved.
 
Back
Top