Ferry mission with Lua, friendly ports dont work as destination

Post bug reports and ask for game support here.

Moderator: MOD_Command

Post Reply
mitsuF2
Posts: 8
Joined: Wed Dec 13, 2017 5:19 pm

Ferry mission with Lua, friendly ports dont work as destination

Post 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
Whicker
Posts: 664
Joined: Tue Jun 19, 2018 9:54 pm

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

Post by Whicker »

not sure if it would work but did you try adding the side?

ScenEdit_AddMission("Faction2", 'Ferry1','ferry',{Destination='Port1', side="otherside"})
mitsuF2
Posts: 8
Joined: Wed Dec 13, 2017 5:19 pm

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

Post 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.
User avatar
michaelm75au
Posts: 12457
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

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

Post 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.
Michael
mitsuF2
Posts: 8
Joined: Wed Dec 13, 2017 5:19 pm

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

Post by mitsuF2 »

Thanks

This will be helpful.

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

Return to “Tech Support”