It is neither of those, I am trying to bypass the escape pod altogether and spawn a brand new ship model based on the ship model of pTarget. So we have pTarget locked and we press our button, what should happen is my ship should change into a duplicate of pTarget.
pcIdentifier I believe only changes the in game display name. I have successfully made changes to pcIdentifier to fix display names when escape pods are launched based on player id (it used to not update your display name, old ship named "Player"). I am trying to alter the pcScript used, which would be the first arg of CreateShip, however I can't seem to find out where to grab the necessary text from, or what set of commands to grab the text for me and insert it into display text...
PodModel = "modelname" is what I need to change dynamically based on pTarget, which would be the pcScript
Thought: Perhaps I can create the text necessary as a global and assign the podname that way...
UPDATE: It appears that TargetCast will work for what I want to do, but the code will be significantly longer because I have to check AND double check ALL ships rather than grabbing the model name from text... I will play around with this, but I have successfully changed my ship into the target ship. Now I need to go about loading in the old hardpoint to the new ship model...
# clear AI, this ship is abandoned (can we not do this yet? just in case we fail... idk)
pShip.ClearAI()
# (Holo-emitter checklist)
# Akira
if (pTargetCast.GetScript() == "ships.Akira"):
loadspacehelper.PreloadShip("Akira", CreateShipsNum)
# StartAbandonShip(pShip)
# USS Century
if (pTargetCast.GetScript() == "ships.USSCentury"):
loadspacehelper.PreloadShip("USSCentury", CreateShipsNum)
# StartAbandonShip(pShip)
else:
return
# Create the Pod (Holo-emitter checklist)
# Akira
if (pTargetCast.GetScript() == "ships.Akira"):
AS_EscapePod = loadspacehelper.CreateShip("Akira", pSet, PodName, PodLaunchPoint)
# else:
# return
# USS Century
if (pTargetCast.GetScript() == "ships.USSCentury"):
AS_EscapePod = loadspacehelper.CreateShip("USSCentury", pSet, PodName, PodLaunchPoint)
# else:
# return
# AS_EscapePod = loadspacehelper.CreateShip("USSCentury", pSet, PodName, PodLaunchPoint)
# Disable Collisions
AS_EscapePod.EnableCollisionsWith(pShip, 0)
AS_EscapePod.DisableCollisionDamage(1)