Ugh, is there a better way of doing this? I’m trying to have it so when you research a certain research topic, it replaces that ship with another ship. It works as-is, mostly but it has a few annoying bugs like the lights on the “removed” ship don’t go out and you see a little bit of the death explosion just before it actually despawns. I’m using addCustomCode for this, which is working pretty well for it, really. Here’s the block of code that I have for replacing the ship at the moment:
Volume_AddCube("NewSpawnVolume", SobGroup_GetPosition(CustomGroup),0.1) SobGroup_CreateIfNotExist("newgroup") SobGroup_SpawnNewShipInSobGroup(playerIndex, "Fed_LargeShipyard", "UpgradedStation", "newgroup","NewSpawnVolume") SobGroup_Clear("newgroup") SobGroup_Despawn(CustomGroup) SobGroup_SetHealth(CustomGroup, 0) Volume_Delete("NewSpawnVolume")
If there was a few sob functions that either let me completely remove a ship, rather than despawning and exploding it, or a replaceShip function or something, that’d be handy… Paging @BitVenom?