Map Database  •  FAQ  •  RSS  •  Register  •  Login

Problem with Actions.HouseRepairEnable

<<

Strangelove

User avatar

Crossbowman

Posts: 230

Joined: 30 Jul 2013, 06:32

KaM Skill Level: Fair

Post 24 Sep 2015, 18:58

Problem with Actions.HouseRepairEnable

Hello,

i've noticed some problems with the Action Actions.HouseRepairEnable. It seems like it cant be used with AI players.

Here my observations:
I've deactivated the AutoRepair for the AI in the MapEditor, to only enable it later for specific houses and under specific conditions. However, the KaM Remake seems to disable it pretty much immidiatly again after i enabled it in the dynamic script (Builders move for like 1~2sec to the damaged building and then stop).
The same goes the other way around. If i activate AutoRepair in the Map Editor and disable it for a specific House with the Action Actions.HouseRepairEnable, the AI still repairs the House.
Is this intended or a bug?


Best regards,
Strangelove
Love the Bomb!

Campaign viewtopic.php?f=5&t=1749
MultiplayerMaps viewtopic.php?f=5&t=2302
AutoComplete viewtopic.php?f=32&t=2722
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3821

Joined: 16 Sep 2007, 22:00

Location: Australia

KaM Skill Level: Skilled

Post 28 Sep 2015, 12:27

Re: Problem with Actions.HouseRepairEnable

It's unintentional. Houses periodically set their repair status to match the AI's configuration (since it could change). But this means you can set it individually for AI houses. I guess we need three states for global AI repair:
Force On
Force Off
Don't care
<<

Strangelove

User avatar

Crossbowman

Posts: 230

Joined: 30 Jul 2013, 06:32

KaM Skill Level: Fair

Post 28 Sep 2015, 17:22

Re: Problem with Actions.HouseRepairEnable

Thanks for your replay. It seemed unintentional to me as well. Why do you actually focre update the set AI configuration that often, instead of just setting it after the house is finished building?
Love the Bomb!

Campaign viewtopic.php?f=5&t=1749
MultiplayerMaps viewtopic.php?f=5&t=2302
AutoComplete viewtopic.php?f=32&t=2722
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3821

Joined: 16 Sep 2007, 22:00

Location: Australia

KaM Skill Level: Skilled

Post 28 Sep 2015, 21:59

Re: Problem with Actions.HouseRepairEnable

Strangelove wrote:Thanks for your replay. It seemed unintentional to me as well. Why do you actually focre update the set AI configuration that often, instead of just setting it after the house is finished building?

As I said, the AI configuration could change. A script might want to globally enable/disable house repair for an AI after some event occurs (e.g. attack is beaten back). Or the autobuild AI might want to switch it on and off depending on how busy the labourers are (I don't think it does that though).

Maybe it would be best to only set it once when the house is built, and only set it again when the AI repair configuration changes.
<<

Strangelove

User avatar

Crossbowman

Posts: 230

Joined: 30 Jul 2013, 06:32

KaM Skill Level: Fair

Post 14 Oct 2017, 10:17

Re: Problem with Actions.HouseRepairEnable

@Rey: Could you pleae look into that?
Love the Bomb!

Campaign viewtopic.php?f=5&t=1749
MultiplayerMaps viewtopic.php?f=5&t=2302
AutoComplete viewtopic.php?f=32&t=2722
<<

Rey

User avatar

KaM Remake Developer

Posts: 206

Joined: 12 Oct 2016, 07:41

Location: Moscow

KaM Skill Level: Fair

Post 15 Oct 2017, 04:36

Re: Problem with Actions.HouseRepairEnable

Sure, I'll check it this week

Return to Dynamic Scripting

Who is online

Users browsing this forum: No registered users and 4 guests