Hi! As promised I'm trying to learn how to write scripts for Avorion, and for my first script, I'd like to create a way to transfer turrets between players (my girlfriend asked for this a lot, since in our game I have a military ship and she has a mining ship, and she can't find good mining turrets while I have LOADS of them and no way to transfer them :D, and now she is making my life a hell!!!)
To understand interaction between ships, I am studying the interaction scripts, especially the "transfercrewgoods.lua" and various others, but eventually, if I have problems, can I ask for advice? Thank you in advance!
EDIT: ok, first question! I understood how to interaction scripts work, essentially using the interactionPossible(PlayerIndex) function to refer to what you want to select to open the menu.
The thing is: how do I refer to another ship that I don't own? I found in the script "transfercrewgoods" this section of code:
Essentially it excludes the drone, the controlled ship and every ship that is not owned by the player. I tried variuos solutions, I even tried to remove everything and just say to the script "ok, accept EVERYTHING", giving a simple "return 1" to the whole block, but when I try to select other ships, they don't seem to be interactable. Where am I doing wrong? I just need a simple suggestion, then I'll go by myself :)
Thank you for the support!