smart anti air widget - targetting how to

smart anti air widget - targetting how to

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
MelKor
Posts: 38
Joined: 15 Oct 2010, 16:05

smart anti air widget - targetting how to

Post by MelKor »

I want to build a script tha allow anti air units to target transports and bombers before any other units. I search for examples of targetting, but I was not able to found something like that.

I serach over forums and LUA script sites, and there is not a clear information about targettiing, except for some references to some functions, but no examples.

Help me to find information or an example for this !!

[DoR]MelKor
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: smart anti air widget - targetting how to

Post by Forboding Angel »

Easiest way to do it would be to prioritize those via target categories. Can't help with a lua solution (but I'm sure plenty of others can), soz.
muckl
Posts: 151
Joined: 30 Aug 2010, 07:18

Re: smart anti air widget - targetting how to

Post by muckl »

had same idea one year ago
but im not so good @ lua & spring engine knowledge
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: smart anti air widget - targetting how to

Post by Google_Frog »

Just rewrite target priorities completely, I did. Here is a gadget which was quite easy to make with the new and fixed target callin in 91.0. It is a pretty simple gadget and even has a config which may be all most games require. Of course new categories can be added.

Just a note; as far as I can tell this callin removes badTargetCats and automatic behaviour such as retargetting from EMPed units. Some of this has been reimplemented in the gadget.

As for widget-land your request is impossible by my standards. By default widgets can only affect firing by giving attack orders and the only way to have complete control over unit firing is to set your units to hold fire. Ping times are too high for hold fire to be a workable solution.

If I relax my standards it is a reasonably easy widget to make, it's just not that effective. A naive solution to start with would be to periodically get your opponents units and give your AA attack orders on to the transports and bombers.
Post Reply

Return to “Lua Scripts”