How to block the /take from a Gadget?

How to block the /take from a Gadget?

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

Moderator: Moderators

Post Reply
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

How to block the /take from a Gadget?

Post by TheFatController »

I'm writing a gadget to allow /take blocking for x seconds to allow players to reconnect however my initial thought to use "AllowUnitTransfer" is not working, the units don't transfer and stay the allies team colour but the engine still kills off the team when /take is executed with death message etc.

Can anyone suggest how else I can block /take from a gadget please or have I missed something here?
User avatar
Niobium
Posts: 456
Joined: 07 Dec 2008, 02:35

Re: How to block the /take from a Gadget?

Post by Niobium »

1) Block /take on :TextCommand and replace SendCommands with a function that checks argument. Ugly.

2) Wait for new spring, where team death is controlled by gadgets. Then allow the /take but do not kill the team for some given period, if the player rejoins then give them back the units they had, until then whoever takes can play around with the units and make sure they don't die. Maybe that old lineage code could help with this too.
Post Reply

Return to “Lua Scripts”