UnitRepaired() callin missing?

UnitRepaired() callin missing?

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
Pithikos
Posts: 146
Joined: 26 Dec 2008, 14:26

UnitRepaired() callin missing?

Post by Pithikos »

There is not some callin that gets run once a unit gets repaired, right? There is for example the callin UnitDamaged() when a unit's health decreases. Isn't there some callin for the opposite(UnitRepaired, UnitHealed..)?

I don't want to run GameFrame() to check a unit's health. Feels a bit overkill.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: UnitRepaired() callin missing?

Post by PicassoCT »

Locals please report once unithealth is to the max...


Remember only you can prevent SimCity from beeing overcrowded.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: UnitRepaired() callin missing?

Post by FLOZi »

I'm not sure if AllowUnitBuildStep() is called when repairing is done or not.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: UnitRepaired() callin missing?

Post by Google_Frog »

I'm not sure if AllowUnitBuildStep() is called when repairing is done or not.
I recall that it is not called for repairing as the ZK implementation of variable repair speeds uses modification of unit cost instead of AllowUnitBuildStep().
User avatar
KingRaptor
Zero-K Developer
Posts: 838
Joined: 14 Mar 2007, 03:44

Re: UnitRepaired() callin missing?

Post by KingRaptor »

Google_Frog wrote:
I'm not sure if AllowUnitBuildStep() is called when repairing is done or not.
I recall that it is not called for repairing as the ZK implementation of variable repair speeds uses modification of unit cost instead of AllowUnitBuildStep().
Or maybe we use unit costs because it is nineteen bajillion times cheaper than a 32*builders/gameframe callin.

(though that doesn't mean for sure it's called during repair)
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: UnitRepaired() callin missing?

Post by Google_Frog »

Unit costs uses unitDamaged.
Post Reply

Return to “Lua Scripts”