Gadget: Area Attack for ground units - Page 2

Gadget: Area Attack for ground units

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

Moderator: Moderators

[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

Re: Gadget: Area Attack for ground units

Post by [Krogoth86] »

Well my first test was in the starting region on Tablua-V2 so it was pretty flat. I'll try out the new version soon - should work with moving in first...

EDIT:
I just tried it and it seems to work so far. It only spams me with some can't reach destination messages after a while... :wink:
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Gadget: Area Attack for ground units

Post by CarRepairer »

Woah. You can desync replays with random numbers?

Deep, man. You just blew my mind. :shock:
SpikedHelmet
MC: Legacy & Spring 1944 Developer
Posts: 1948
Joined: 21 Sep 2004, 08:25

Re: Gadget: Area Attack for ground units

Post by SpikedHelmet »

Would it be possible to make a unit ONLY able to area attack?

A few more:

Rather than click+drag to set the size, can you have set sizes determined in customparams? For instance, setareaattacksize=100; would make it so that the automatic size of the area attack circle is 100 units wide.. I want to make our artillery, and bombers, only able to area attack and not target individual points -- so even removing its ability to attack, if the size of the area attack can be set each time it's easy to simply set a very small circle...

As for the above, I tried canattack=0 tag hoping it would remove the attack command, but doing so makes area attack not function, ie the unit will not fire at all. Can this be changed as well?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Gadget: Area Attack for ground units

Post by KDR_11k »

You can hide the attack button and disallow unsynced attack commands.

Per-unit radius would be possible, yeah. Would you want that as a minimum radius or a fixed radius, i.e. should the player be able to define a bigger circle?

I think there's a lua error when a circle of no size is defined, for some reason Lua throws an error when the random doesn't get a range of more than one element instead of just returning the minimum value all the time.
Post Reply

Return to “Lua Scripts”