Page 1 of 1
Spawning mobs with a script
Posted: Sat Nov 01, 2014 1:09 pm
by The cube
So earlier today when continuing to work on my level, i came across this problem. I was going to have a bossfight where you fight zarchtons that climb from the water, but then realized, that monsters spawned by spawners have no name to call on to add them to the bossfight. So, i need to spawn the monsters with a script. Is it possible?
Oh, and of course the monster spawned with a script would need to be able to have a name.
Thanks.
Re: Spawning mobs with a script
Posted: Sat Nov 01, 2014 7:36 pm
by Jgwman
spawn(object, level, x, y, facing, elevation, [id])
Spawns a new object at given position on a dungeon level where x and y specify the x- and y-coordinates on the map and level is a level index. facing must be a number between 0 and 3 and it indicates the following directions: 0=north, 1=east, 2=south, 3=west. id parameter is optional. If given it must be an unique id in the context of the dungeon. If not given an unique id is automatically generated.
Works with monsters
Ex:
spawn("herder", 1, 15, 14, 0, 0, "herder_boss_1")
Re: Spawning mobs with a script
Posted: Sat Nov 01, 2014 7:55 pm
by NutJob
I'll eventually add my spawner script weighing in at ~400 lines but it's error prone atm, being I haven't bothered adding in all the error checking. Anyways, I'm sure this reply was extremely unhelpful. ha!