I'm going to put this out there for our experienced scripters to test as I dont have the time due to other TF work. I make no guarentees it will work, but I can get bases to move in real-time, it's a matter of whether this code has bugs or not.
Concept: The concept is to move a spawn base in real-time relative to the movement on a specified actor. I have in mind something like a Luftwaffe bombing mission to London with (say) two (one red, one blue) air-spawn bases that move with the boming group. That way players can spawn-in relatively close to the action without having to takeoff from the ground & spend time climbing to incept or escort the group. Any spawn base can be converted into a moving spawnbase.
How it works: Create a spawnbase in the corner of a map (or anywhere really). Then use the script to convert it into a moving base after the battle starts. What happens is that a spawnbase is created on-the-fly at a position relative the the actor that is attached to the base. The old spawn base is destroyed after a short period & a new base is spawned into the game at the position relative the an 'attached' actor. In this way, the base will move over time with the actors movement. Moving bases can be attached to ground actors or to air actors. To aid testing I've also included a debug mode switch that will allow debugging lines to be written to the game console.
Extended AiBirthplace method:
ToMovingBirthplace() ..... Converts a 'normal' spawnbase into a moving air-spawnbase that moves with the specified actor.
MovingBirthPlace methods:
AttachToActor() ........... Attaches the spawnbase to the specified actor at a distance, angle & altitude relative to that actor's position
DetachFromActor() ........ Detaches an attached actor from the base. The base will remain static at it's last position.
Destroy() ..................... Remove the moving base from the game.
UpdateInterval() ............ Set an interval (in seconds) for how frequently a base position is updated. Default = each 60 seconds
ToAiBirthplace() ............. Converts a moving spawnbase into a 'normal' ground spawn base at the specified airfield.
Code removed by the author, it was buggy & not up to the standard I set for myself.
Bookmarks