Map Database  •  FAQ  •  RSS  •  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
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3822

Joined: 16 Sep 2007, 22:00

KaM Skill Level: Skilled

ICQ: 269127056

Website: http://lewin.hodgman.id.au

Yahoo Messenger: lewinlewinhodgman

Location: Australia

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?
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3822

Joined: 16 Sep 2007, 22:00

KaM Skill Level: Skilled

ICQ: 269127056

Website: http://lewin.hodgman.id.au

Yahoo Messenger: lewinlewinhodgman

Location: Australia

Post 28 Sep 2015, 21:59

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?
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?
<<

Rey

User avatar

KaM Remake Developer

Posts: 217

Joined: 12 Oct 2016, 07:41

KaM Skill Level: Fair

Location: Moscow

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 2 guests