Cannot spawn vehicles on runway
Closed this issue · 2 comments
in mist.teleportToPoint
, I had to add 'RUNWAY' as a valid terrain type for vehicles :
local validTerrain = {'LAND', 'ROAD', 'SHALLOW_WATER', 'WATER', 'RUNWAY'}
if string.lower(newGroupData.category) == 'ship' then
validTerrain = {'SHALLOW_WATER' , 'WATER'}
elseif string.lower(newGroupData.category) == 'vehicle' then
validTerrain = {'LAND', 'ROAD', 'RUNWAY'}
end
That is done on purpose. Same applies to spawning amphibious ground vehicles in the water via that function. Its meant to be used as a quick and basic way to get randomization. If you want more customized spawning of groups you do the randomization yourself and call mist.dynAdd. However due to a couple of other questions/issues with that function over the years I have added extra parameters to mist.teleportToPoint and the other "inZone" functions. One of the parameters is passing a custom value for validTerrain. There are some things I need to check and cleanup with the code, but be on the lookout for the next development build.
Evidently I added an optional value for that back in November to the function to customize it.
4e7b415#diff-6bf2bee6f25512a5123a016731f9ca78dad770dc7ee8e7a87687b3b60f0ea91eR3460
What I added the other day and committed recently to development branch was the anyTerrain boolean that won't restrict any terrain type.