[SOLVED][SCRIPTING] Spawn ship in hyperspace?

Is there a way using gametype scripting to create or spawn a ship such that it is in hyperspace and not on the map? I know this can be done in a .level file, but I need it to be a gametype script. Thanks.

[edit]

Basically, I’m trying to reproduce the effect of spawning the fleet at the beginning of each mission. However, I can’t make use of the normal methods.

One bad thing I noticed is that the SobGroup_ExitHyperSpace function shows the ships for a split second before starting the exit hyperspace animation. This is aggravating.

can you spawn the ships way at the edge of the map (maybe the top), enter them into hyperspace and then move them to where you want the player to see them?

Haven’t tried it myself, but you might need to use 2 functions, SobGroup_SpawnNewShipInSobGroup then SobGroup_EnterHyperspaceOffMap . I don’t know if it will work or not, but if you place the functions one after the other, it should do both functions within 1 frame.

Here are the notes I’ve been taking:

  • SobGroup_CreateShip - needs at least one existng builder to work, does not use hyperspace effect for large ships but instead spits them out the hangar as if built by the player
  • SobGroup_SpawnNewShipInSobGroup - no hyperspace effect, no parade formation, all ships bunched up in the middle, ignores rotation parameters of point/sphere
  • Player_FillShipsByType - fills all of a player’s ships of that type, not just the ones in a sobgroup
  • SobGroup_Despawn - instant
  • SobGroup_Spawn - ships need to already be in hyperspace, instant
  • SobGroup_EnterHyperSpaceOffMap - is not instant, uses hyperspace animation, ignores small ships
  • SobGroup_ExitHyperSpace - ships need to already be in hyperspace, even the small ships use the hyperspace effect if they are not docked, makes the ships visible for a split second before showing the hyperspace animation (WTF?!), ignores rotation parameters of point/sphere and instead orients ships based on the direction of travel, ships exit in formation but are not “linked” to the mothership and don’t move with it, small ships become damaged and need healing even if they are docked
  • SobGroup_HyperspaceTo - seems to work similarly to SobGroup_ExitHyperSpace
  • SobGroup_HyperspaceToVector - seems to work similarly to SobGroup_ExitHyperSpace
  • SobGroup_ParadeSobGroup - the mothership does not use the hyperspace effect and instead just sits there, has instant modes
  • Player_InstantDockAndParade - puts small ships inside the mothership hangar and does not launch them automatically, applies to all player ships everywhere including ships that are supposed to be placed around the map
  • SobGroup_DockSobGroupInstant - puts big ships in the shiphold also, works on ships in hyperspace
  • Player_GetShipsByFilterExclude - ships must be in alive space, works on all of a player’s ships instead of just a single sobgroup
  • Player_GetShipsByFilterInclude - ships must be in alive space, works on all of a player’s ships instead of just a single sobgroup

So the main problem actually is getting them out of hyperspace again, and in parade formation. I have tried several ways, but SobGroup_ExitHyperSpace shows the ships for a split second, which ruins the effect.

[edit]

Updated notes!

This is what I’ve been doing, and seems the only way.