Commando Saboteur

Commando Saboteur

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

Moderator: Moderators

Post Reply
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Commando Saboteur

Post by jK »

This LuaRule gives your Commando Tanya-style (Red Alert2) bomb planting abilites, so you can bomb your enemy's advance fusions :twisted:

Image

>commando saboteur.zip<

small description:
it adds a new button "PlantBomb" and depending on the MaxHealth of the victim the planting will take longer. The included .cob decloaks the commando during planting the bomb.

issues:
Atm the script can only handle one unit type, so you can't add a saboteur on core and arm side, also there is no config-file, but there are some variables at the top of the luaRule.
Cause there are too many cases to reactivate cloaking, i decided to put all cloaking stuff into the .cob. So if you use your own unit/cobscript you have to do so too (there are 2 cob events: StartPlantBomb and StopPlantBomb).
THE UNIT HAS TO SUPPORT CMD_CAPTURE! (cause of a workaround)

small tip:
if you want to make your own custom commands with unit interactions, then the code is very interesting for you, cos it really isn't easy to integrate a custom command into the commandqueue (with visual dotted lines etc.).

PS: this is not the same version as in Tired Annihilation 0.7-0.8 ;)
However TiA 0.10 has a working version of it implemented.
Last edited by jK on 28 Aug 2007, 12:40, edited 2 times in total.
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Post by Neddie »

Good, because the version in Tired Annihilation has issues.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Post by jK »

cause it was a beta (never meant to be released ...)
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Post by Neddie »

Ah. Smack him in the face for me, and thank you for this great bit of work.
User avatar
Tired
Posts: 302
Joined: 14 Nov 2005, 07:19

Post by Tired »

It's the version used in Tired Annihilation v0.10. ~~

As the mod's still in beta, it's hard to come up with a better testing ground for the widget (which's received quite a few revisions based upon said testing), so die. =P

Widget works quite well now, btw.
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Post by Warlord Zsinj »

JK, currently, it seems like this is not part of the in-built spring order set, which is causing some serious logical/intuitive issues.

- There is no visual indication that a sap charge has been laid (say, the 'sap' icon appears above the targetted unit') until the bomb starts to be laid.

- Because it is not quite part of the orderset, I can give my guy a normal order (say, move), then while he is carrying out that normal order, click the 'lay charge' button. He will not register as a new order which stops his current order, he will continue to move to the location, while laying the bomb. Which looks pretty silly if you have some sort of stop function (this can be worked around using other things, but it's a direct cause of the missing link in the order chain).

- Because this is not identified as a weapon, a unit given a sap order outside of the range of his sap charge will not move into position to lay the charge.

- There is no way to view this range in-game.

These things are really important in terms of intuitiveness and UI-integration.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Commando Saboteur

Post by jK »

jK wrote:THE UNIT HAS TO SUPPORT CMD_CAPTURE! (cause of a workaround)
jK wrote:small tip:
if you want to make your own custom commands with unit interactions, then the code is very interesting for you, cos it really isn't easy to integrate a custom command into the commandqueue (with visual dotted lines etc.).
-> It works (if the unit knows the CMD_CAPTURE) and the range is the buildradius.
User avatar
Tired
Posts: 302
Joined: 14 Nov 2005, 07:19

Post by Tired »

The unt can walk around and perform commands while planting, yes, but the planting still stops if you exit the unit's build radius. Small build radius ftw.
Post Reply

Return to “Lua Scripts”