"no unit corpses" lua script buggy

"no unit corpses" lua script buggy

Classic game design, maintained to please you...

Moderator: Content Developer

Post Reply
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

"no unit corpses" lua script buggy

Post by TradeMark »

units that are added by map will leave corpse
SirMaverick
Posts: 834
Joined: 19 May 2009, 21:10

Re: "no unit corpses" lua script buggy

Post by SirMaverick »

How's the corpse called?
Why I'm asking:

Code: Select all

function gadget:AllowFeatureCreation(featureDefID, teamID, x, y, z)
  local featureName = (FeatureDefs[featureDefID].tooltip or "nil")
  if string.find(featureName, 'Wreckage') then
    return false
  elseif string.find(featureName, 'Shards') then
    return false
  elseif string.find(featureName, 'Rubble') then
    return false
  elseif string.find(featureName, 'Heap') then
    return false
  end
  return true
end
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: "no unit corpses" lua script buggy

Post by TradeMark »

Code: Select all

[tllmedfusion_dead]
{
	Description=Fusion Wreckage;
	Object=tllmedfusion_dead;
	Featuredead=tllmedfusion_heap;
	Footprintx=5;
	Footprintz=5;
	Height=12;
	Blocking=1;
	Metal=2500;
	Damage=3000;
}

[tllmedfusion_heap]
{
	Description=Fusion Debris;
	Object=4x4c;
	Footprintx=5;
	Footprintz=4;
	Blocking=0;
	Metal=1250;
	Damage=1500;
}
that "debris" one.

shouldnt you white list the corpses instead of blacklisting? theres less allowed corpses than the disallowed ones...

so just make array of those wall corpses and allow only them.

or even better: give wall corpses some identifier that differs from everything else, that'll do it for sure, and easier to maintain too.
SirMaverick
Posts: 834
Joined: 19 May 2009, 21:10

Re: "no unit corpses" lua script buggy

Post by SirMaverick »

TradeMark wrote:that "debris" one.
Just rename to one of the 4 possibilities.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: "no unit corpses" lua script buggy

Post by TradeMark »

SirMaverick wrote:
TradeMark wrote:that "debris" one.
Just rename to one of the 4 possibilities.
and re-upload all my maps? lol...


why cant you just do it like i said? it will be bulletproof system.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: "no unit corpses" lua script buggy

Post by TradeMark »

Code: Select all

function gadget:AllowFeatureCreation(featureDefID, teamID, x, y, z)
	local featureName = (FeatureDefs[featureDefID].tooltip or "nil")
	if string.find(featureName, 'Teeth') then
		return true
	end
	if string.find(featureName, 'Wall') then
		return true
	end
	return false
end
now it will allow corpses with teeth or wall in their names. and thats all we need.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: "no unit corpses" lua script buggy

Post by TradeMark »

is it fixed yet?
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: "no unit corpses" lua script buggy

Post by TheFatController »

Stop posting that in threads :P no it's not fixed yet cause new BA hasn't been released but when it is it'll be fixed..!
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: "no unit corpses" lua script buggy

Post by TradeMark »

thats all i wanted to hear. so you use my code now instead?
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: "no unit corpses" lua script buggy

Post by TheFatController »

I need to make sure it wouldn't break stuff like growing feature maps should anyone ever wish to make one but otherwise yeah that's a good way of doing it.
Post Reply

Return to “Balanced Annihilation”