Page 1 of 1

Ferry mission with Lua, friendly ports dont work as destination

Posted: Tue Apr 30, 2019 7:11 am
by mitsuF2
Ferry missions for ships with destination in other faction/side.

ScenEdit_AddMission("Faction2", 'Ferry1','ferry',{Destination='Port1'})

This gives "ScenEdit_AddMission 0: missing destination" error if destination is in other friendly side.

Ferry-mission destined to a port in other friendly faction (with A subscript) CAN be added thru UI with Add New Mission.
So deduced that it would be possible thru script also.


Tried to add some regular (Cycle) ship traffic automatically, but the destination happened to be in other faction.
Search didn't help (yet?). Ferrying within a one side ofc works as expected.

User error/feature/a bug?

Thank You

RE: Ferry mission with Lua, friendly ports dont work as destination

Posted: Tue Apr 30, 2019 1:06 pm
by Whicker
not sure if it would work but did you try adding the side?

ScenEdit_AddMission("Faction2", 'Ferry1','ferry',{Destination='Port1', side="otherside"})

RE: Ferry mission with Lua, friendly ports dont work as destination

Posted: Tue Apr 30, 2019 1:57 pm
by mitsuF2
Thanks for the reply

Adding side didn't seem to help, same error. Good idea though.
Dest has to be in the same side. Command Lua Docs only mention destination.

RE: Ferry mission with Lua, friendly ports dont work as destination

Posted: Wed May 01, 2019 7:22 pm
by michaelm75au
I will check. Not sure if I updated Lua for ships as ferry mission originally applied to aircraft only.

I just noticed you want to add mission for port not belonging to the same side as the unit. Not sure that would be passing the Lua validation checks. [I have had an eye infection for the last week+ so vision is a bit fuzzy sometimes[:D]]

Can you add a save and what you want to execute so I can test it.

--
Ferry to friendly airfield also can't be created. Changing destination validation from 'by Side' to 'by Scenario', which aligns with UI, should correct this.

RE: Ferry mission with Lua, friendly ports dont work as destination

Posted: Sun May 05, 2019 6:00 am
by mitsuF2
Thanks

This will be helpful.

I edited the scenario in question ...and saved, so no good example existing at the moment.