Loading...
  OR  Zero-K Name:    Password:   

Post edit history

B418938 12 on Mini_SuperSpeedMetal_Wide (Multiplayer)

To display differences between versions, select one or more edits in the list using checkboxes and click "diff selected"
Post edit history
Date Editor Before After
6/9/2016 10:04:47 PMUSrankShaman before revert after revert
6/9/2016 10:03:09 PMUSrankShaman before revert after revert
6/9/2016 10:01:38 PMUSrankShaman before revert after revert
6/9/2016 10:01:22 PMUSrankShaman before revert after revert
6/9/2016 9:59:45 PMUSrankShaman before revert after revert
6/9/2016 9:56:29 PMUSrankShaman before revert after revert
Before After
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]