• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[AI] Upgrade Unit

Status
Not open for further replies.
Level 22
Joined
Feb 3, 2009
Messages
3,292
So In my map I have buildings that upgrade to better buildings

In my map Fortress upgrades to Lords Fortress

So here is the problem, I 1st of all Order a worker to build a Fortress and after it's complete I order it Upgraded to Lords Fortress.
And then the AI start's to build a new Fortress, as he doesn't have one anymore (because the old one is now Lords Fortress)

And that is the problem, I want to make the AI know that Lords Fortress if a better than Fortress, I don't want him to have both, as it's waste of space and gold and lumber.

How do I do that?

I'm actually very good with AIs, but I never managed to figure this out.
 
Run an upgrade once you upgrade your fortress (detect it with Unit - A unit finishes an upgrade) and then, whenever you want to build a fortress, just make an Integer Comparison
  • (Current research level of Iron Forged Swords for Player 1 (Red)) Not equal to 0
and then order the unit to build a Lords Fortress.

Action to run the upgrade: Player - Set the current research level of Iron Forged Swords to 1 for Player 1 (Red)
 
Level 10
Joined
Oct 31, 2009
Messages
352
Is your lord's fortress properly defined as the 4th tier in your maps gameplay constants?

/concur (though I think it'd be the second tier the way he's describing it)

Setting it as the next tier should tell the AI that it is part of a chain of upgrades of the same structure and ergo it will not construct a new building. I haven't done much work with the AI editor but that would be my first guess.
 
Status
Not open for further replies.
Top