Page 1 of 1

Coding ship names question

Posted: Sat, 25. Jan 20, 13:58
by cloaker99
Hello, I apologize in advance for the newb questions, this is day 5 of scripting X3!

I wrote a script that changes the playership name to something like "Transport 10000 FREE" which basically tells me what type of duty the ship is used for, the cargo size, and if its "FREE" or "WORK" or about 10 other status that I set.

The script works fine with the ship I am sitting in, but I want to rename ships that I am selecting from a list. I tried using "THIS" and selecting a ships control panel from a list of ships sitting at a station for example and it didn't work. If I use playership it just always renames the current ship I am sitting in.

I would eventually like to add it to the control dropdown menu for all ships so that I can just click it.

I do not want it to run all the time. I want to select the ships to rename because I have other naming conventions for ships that are very specialized and use 000 as the start of their name so they sort at the top of the ship list.

I am willing to have many scripts for different jobs like transport, trader, fighter, miner, supply, fueler etc but a dropdown might be a nice touch. maybe version 2? haha

Thanks, please let me know if I need to move this thread, I tried to search it up before posting and this seemed like the place!

David

Re: Coding ship names question

Posted: Sat, 1. Feb 20, 10:05
by X2-Illuminatus
cloaker99 wrote:
Sat, 25. Jan 20, 13:58
I tried using "THIS" and selecting a ships control panel from a list of ships sitting at a station for example and it didn't work. If I use playership it just always renames the current ship I am sitting in.
THIS always refers to the object your script is running on. While PLAYERSHIP is the ship you're currently sitting in.

For a ship by ship selection mode, you could use a command slot.