Something captured should stop being paralyzed
Moderator: Moderators
Something captured should stop being paralyzed
If something's paralyzed and you capture it, it remains paralyzed. Kind of a bummer. Can that be fixed?
Re: Something captured should stop being paralyzed
Well you cant wait a emp pulse to magically stop working then you need it... :)Caydr wrote:If something's paralyzed and you capture it, it remains paralyzed. Kind of a bummer. Can that be fixed?
Well, are there ways to have weapons deliver a special (lua-scripted) effect that could mimic a stun? Or are you stuck using the engine-defined EMP effect? It seems like special-effect-damage is one of those things that could be heavily scripted without borking the AIs. After all, all an AI needs to know about a weapon is "who do I shoot it at".
LuaRules/main.lua:
Code: Select all
function AllowUnitTransfer(unitID, unitDefID, oldTeam, newTeam, capture)
if (capture) then
Spring.SetUnitHealth(unitID, { paralyze = -1 })
end
return true
end
What I mean is like "you can cut the leg of a enemy out and then want it to grow back after he comes to your side"Pxtl wrote:Well, are there ways to have weapons deliver a special (lua-scripted) effect that could mimic a stun? Or are you stuck using the engine-defined EMP effect? It seems like special-effect-damage is one of those things that could be heavily scripted without borking the AIs. After all, all an AI needs to know about a weapon is "who do I shoot it at".
Is that implemented then? Does it need to be activated by an FBI switch?trepan wrote:LuaRules/main.lua:Code: Select all
function AllowUnitTransfer(unitID, unitDefID, oldTeam, newTeam, capture) if (capture) then Spring.SetUnitHealth(unitID, { paralyze = -1 }) end return true end
Bear (bare? no I think it's bear) with me, for I am inept.
You are saying, I add nothing more and nothing less than:
to a brand-new, empty file called "main.lua" in the following directory:
AASpring24.sdz
\LuaRules
And units will no longer remain paralyzed when captured?
Thanks
You are saying, I add nothing more and nothing less than:
Code: Select all
function AllowUnitTransfer(unitID, unitDefID, oldTeam, newTeam, capture)
if (capture) then
Spring.SetUnitHealth(unitID, { paralyze = -1 })
end
return true
end
AASpring24.sdz
\LuaRules
And units will no longer remain paralyzed when captured?
Thanks