Hello !
I'm currently trying to integrate custom spawnpoints to my mod (that originally only contained a replacement for prisoner coveralls).
So far, I managed to create a custom spawnpoint (in a random prison cell of the Rosewood penitenciary), modify the player's starting gear and erase from distribution prisoner coveralls to replace them by my new convict clothes ^^
However, every time my player spawns in the prison, the closest zombies spawn outside. maybe sometimes one or two inside but really nothing else... It makes it uninteresting since you have the whole penitenciary for yourself...
The strangest thing is that if I spawn somewhere else and then teleport the player inside the prison, it's well populated and makes for a great challenge ! But not when the player spawns IN the prison, I have no idea why since other mods making the player spawn in the prison aren't affected by that problem. So I've tried to manually spawn zombies, taking inspiration from pillow's mod, but without succes :
The function above is supposed to be called on a new player creation, but it never happens. I see three solutions to my problem :
1. Spawn the player at a random location and teleport him/her instantly in the prison when the game starts.
2. Manage to force the spawn of zombies (what I've tried, without success).
3. Resolve the problem that makes it so no zombies spawn when selecting my mod.
But in all three cases, I've reached the end of my rope and I dunno how to do Any help is welcome, ofc if you have remarks on my code I'm open to suggestions !! ^^ (the file is included)
Thank you very much all !
Prison_Cell_Spawn.lua