"no unit corpses" lua script buggy
Moderator: Content Developer
"no unit corpses" lua script buggy
units that are added by map will leave corpse
-
- Posts: 834
- Joined: 19 May 2009, 21:10
Re: "no unit corpses" lua script buggy
How's the corpse called?
Why I'm asking:
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
Re: "no unit corpses" lua script buggy
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;
}
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.
-
- Posts: 834
- Joined: 19 May 2009, 21:10
Re: "no unit corpses" lua script buggy
Just rename to one of the 4 possibilities.TradeMark wrote:that "debris" one.
Re: "no unit corpses" lua script buggy
and re-upload all my maps? lol...SirMaverick wrote:Just rename to one of the 4 possibilities.TradeMark wrote:that "debris" one.
why cant you just do it like i said? it will be bulletproof system.
Re: "no unit corpses" lua script buggy
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
Re: "no unit corpses" lua script buggy
is it fixed yet?
- TheFatController
- Balanced Annihilation Developer
- Posts: 1177
- Joined: 10 Dec 2006, 18:46
Re: "no unit corpses" lua script buggy
Stop posting that in threads
no it's not fixed yet cause new BA hasn't been released but when it is it'll be fixed..!

Re: "no unit corpses" lua script buggy
thats all i wanted to hear. so you use my code now instead?
- TheFatController
- Balanced Annihilation Developer
- Posts: 1177
- Joined: 10 Dec 2006, 18:46
Re: "no unit corpses" lua script buggy
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.