Page 1 of 1
Help With Spawning Star fighters [Solved]
Posted: Mon Jun 23, 2014 3:59 pm
by Lorul1
Im making a space map and i need help figuring out how to make the star fighters spawn in while in space. What im talking about is, when you drift of away from your mothership enemy and friendly ships just come from nowhere.
I know they do this in every stock map and some modded maps, but i just need help figuring it out
Re: Help With Spawning Star fighters
Posted: Mon Jun 23, 2014 4:37 pm
by Locutus
I don't know what causes the bug that makes fighter magically appear out of nowhere at the map edges but regarding space spawn your possibilities are limited.
Unfortunately you can't spawn vehicles via lua (well, technically you can but they're not usable in that case) so what you have left is either pre-placing them in ZE (means, no respawn) or using a regular vehicle spawn.
When using a vehicle spawn, I assume you want your vehicles do sth. in space and not just standing around. The simplest solution here is to change the pilot type of your fighter to "vehicleself". It can be entered by soldiers but the fighter also acts on its own. But be aware that adding this behavior will break your map for MP. The second possibility would be forcing an AI player into the fighter.
This is some working code I was using for the Stargate mod map:
Note that in this example the spawned vehicle can stay idle for some time in case we don't have a character spawn immediately after the vehicle spawn.
I am currently trying to find a workaround but it's not working properly:
Hope that helps a bit, though I'm currently also looking for a solution and would also be glad about help^^
Re: Help With Spawning Star fighters
Posted: Mon Jun 23, 2014 11:30 pm
by Lorul1
Okay thanks locutus
I never saw the ships coming from nowhere as a bug, rather a fix for a lack of star fighters. Maybe a fix that the game designers never shiped to modtools after final testing. (Along with the correct color for the geonosis dirt, and tantive 4 walls with panels). but thank you for the explanation and different methods I can try
Also I would like to help you with your workaround, however I know little to nothing about programming and by the look of your script you probably know alot more that I do. I'm just a 15 year old that picked up modding battlefront 2

.For now I only know as much Lua as I need but, one day when I learn more about programing in LUA I would be glad help you with your workaround.
Thanks again.