Page 1 of 1

Lua Script help to simulate retreating planes/ ships

Posted: Mon Aug 28, 2017 10:38 am
by TYHo
Hi guys,

Need help to simulate retreating planes/ ships using Lua... The trigger is the computer oppoinent plane/ ship is 50% damage, but how do I make the plane/ ship disengage and retreat? Thanks!

RE: Lua Script help to simulate retreating planes/ ships

Posted: Mon Aug 28, 2017 5:36 pm
by Rory Noonan
With aircraft damage on, an aircraft will automatically disengage and head home if it suffers significant damage. It looks like the threshold is ~25%

With ships all you need to do is a set a port as a home base for the ship, then change the doctrine 'withdraw' settings to whatever threshold you want.

Lua isn't necessary for this behaviour [:)]

RE: Lua Script help to simulate retreating planes/ ships

Posted: Mon Aug 28, 2017 6:27 pm
by DrYorgashReeksPhD
Why is it that the developers of this game (Mike especially) seem to think the majority of its players are computer programmers or have a big interest in that? Speaking for myself, I did not purchase this game to learn LUA in order to create scenarios. Streamline the process somehow for those of us who want to utilize the military and geopolitical features of the game and not learn LUA and code in the process.

RE: Lua Script help to simulate retreating planes/ ships

Posted: Mon Aug 28, 2017 8:54 pm
by Rory Noonan
Er... What part of 'Lua isn't necessary for this behaviour' feeds into that argument?

You don't need Lua to make scenarios. You can make very complex and entertaining scenarios without any Lua whatsoever. See the 'Standalone Scenarios' and Gunner98's early Northern Fury series for some excellent examples.

RE: Lua Script help to simulate retreating planes/ ships

Posted: Tue Aug 29, 2017 11:25 am
by TYHo
set a port as a home base for the ship

Thanks! This is what I need...

RE: Lua Script help to simulate retreating planes/ ships

Posted: Tue Aug 29, 2017 5:33 pm
by thewood1
ORIGINAL: DrYorgashReeksPhD

Why is it that the developers of this game (Mike especially) seem to think the majority of its players are computer programmers or have a big interest in that? Speaking for myself, I did not purchase this game to learn LUA in order to create scenarios. Streamline the process somehow for those of us who want to utilize the military and geopolitical features of the game and not learn LUA and code in the process.

Unfortunately enough people don't read all the documentation and practice using the features to know a lot can be done without Lua.

You can play this game fine without lua. The game went for a couple years without it. I am sure the devs would be more than happy to remove lua access if you can get enough of your fellow games to vote on removing lua as a feature. Because, you know, the devs forcing you to use it really is against all that is good and holy.

btw, good first post to introduce yourself and build relationships.