Something captured should stop being paralyzed

Something captured should stop being paralyzed

Various things about Spring that do not fit in any of the other forums listed below, including forum rules.

Moderator: Moderators

Post Reply
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Something captured should stop being paralyzed

Post by Caydr »

If something's paralyzed and you capture it, it remains paralyzed. Kind of a bummer. Can that be fixed?
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Post by Neddie »

Feature Request.

Ask for a new tag or function to eliminate paralysis when a unit changes hands. It must not apply to when allies share units willingly.
manored
Posts: 3179
Joined: 15 Nov 2006, 00:37

Re: Something captured should stop being paralyzed

Post by manored »

Caydr wrote:If something's paralyzed and you capture it, it remains paralyzed. Kind of a bummer. Can that be fixed?
Well you cant wait a emp pulse to magically stop working then you need it... :)
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Post by Pxtl »

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".
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

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
manored
Posts: 3179
Joined: 15 Nov 2006, 00:37

Post by manored »

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".
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"
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

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
Is that implemented then? Does it need to be activated by an FBI switch?
tombom
Posts: 1933
Joined: 18 Dec 2005, 20:21

Post by tombom »

Next release of Spring, put that in LuaRules/main.lua and it will do what you wanted. Lua is pretty cool.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

lua IS pretty cool!!! :shock:

What other cool stuff can I do with it?? :D
User avatar
Boirunner
Kernel Panic Co-Developer
Posts: 811
Joined: 05 Feb 2007, 14:24

Post by Boirunner »

Caydr wrote:lua IS pretty cool!!! :shock:

What other cool stuff can I do with it?? :D
Seriously, pretty much everything. Ask what you can't do with it.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

Can it rid the world of bad hairpieces?
User avatar
Boirunner
Kernel Panic Co-Developer
Posts: 811
Joined: 05 Feb 2007, 14:24

Post by Boirunner »

If by the world you mean altored_divide then yes, probably.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

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:

Code: Select all

function AllowUnitTransfer(unitID, unitDefID, oldTeam, newTeam, capture)
  if (capture) then
    Spring.SetUnitHealth(unitID, { paralyze = -1 })
  end
  return true
end
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
Post Reply

Return to “General Discussion”