Closed ladybogit closed 3 years ago
I've pushed some experimental changes for this which should fix this about 90% of the time (as this impacts many spawn circumstances) but ultimately this is a problem related to collision and how it is evaluated more than anything else which is a bigger picture issue (and it was an issue on live, as noted in the wiki article you linked).
Changes:
getRandom2DLocationAroundLocation()
now uses a while loop so it will try 100 times instead of 4 to find a suitable spawning location.isValidQuestSpawnPoint()
which is used by getRandom2DLocationAroundLocation()
now checks if there is a building located at the spawn point, which should prevent spawns from getting placed where they would be unreachable (e.g. behind the walls of a building but not actually in a building).encounter
type of quest task, I added a height check so if a spawn ends up on top of some random object like in this case, it should destroy it and try again.I tested this a few hundred different ways and it seems to be working as intended but there are a lot of cases where this is used that I may not have caught. If anything starts spawning weird/broken/stuck, let me know. Just keep flagging these as there may be a few cases where this solution won't work and we'll need to carve out some custom rules or adjust what I implemented. Thank you!!
For reference, below are examples of the collision issues I've mentioned so you can visualize them:
npc's spawn unhittable here and under the star port when you trigger the spawn event (infount of the bunker door) i had to restart the quest 4 times to do the quest using this command /gmregrantquest <quest/code_string>
Mission info: https://swg.fandom.com/wiki/Doing_Your_Duty