1 |
[quote]local terraUnitHP = 1000000 --hp of terraunit, must be the same as on unitdef[/quote]
|
1 |
[quote]local terraUnitHP = 1000000 --hp of terraunit, must be the same as on unitdef[/quote]
|
2 |
\n
|
2 |
\n
|
3 |
Why isn't this
|
3 |
Why isn't this
|
4 |
[quote]local terraUnitHP = UnitDefNames["terraunit"].health[/quote]
|
4 |
[quote]local terraUnitHP = UnitDefNames["terraunit"].health[/quote]
|
5 |
\n
|
5 |
\n
|
6 |
\n
|
6 |
\n
|
7 |
Another fix:
|
7 |
Another fix:
|
8 |
\n
|
8 |
\n
|
9 |
[quote]for id,data in pairs(UnitDefs) do
|
9 |
[quote]for id,data in pairs(UnitDefs) do
|
10 |
if data.name ~= "terraunit" then
|
10 |
if data.name ~= "terraunit" then
|
11 |
data.health = data.health*hpmult
|
11 |
data.health = data.health*hpmult
|
12 |
end
|
12 |
end
|
13 |
end[/quote]
|
13 |
end[/quote]
|
14 |
\n
|
14 |
\n
|
15 |
Or
something
like
that.
Very
simple
fix,
probably.
|
15 |
Or
something
like
that.
Very
simple
fix,
probably.
If
UnitDefs
is
an
ordered
table,
you
can
just
do:
|
|
|
16 |
\n
|
|
|
17 |
[quote]for i=1,#UnitDefs do
|
|
|
18 |
if UnitDefs[i].name ~= "terraunit" then
|
|
|
19 |
UnitDefs[i].health = UnitDefs[i].health * hpmult
|
|
|
20 |
end
|
|
|
21 |
end[/quote]
|
16 |
\n
|
22 |
\n
|
17 |
[b][color=red]Disclaimer: I am not totally knowledgable in this subject, take this as an amateur's opinion[/color][/b]
|
23 |
[b][color=red]Disclaimer: I am not totally knowledgable in this subject, take this as an amateur's opinion[/color][/b]
|