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!
Not to come off as rude, but that system is rather bad. It creates a significant amount of lag (due to the memory leaks).
You will also need dozens of triggers for the items alone.
And the AI isn't very intelligent, which removes the "I" in "AI" :/
Not to come off as rude, but that system is rather bad. It creates a significant amount of lag (due to the memory leaks).
You will also need dozens of triggers for the items alone.
And the AI isn't very intelligent, which removes the "I" in "AI" :/
I'm just trying to say that you could greatly improve that system
I'll post a few examples.
When I said "You will also need dozens of triggers for the items alone", I meant you could easily combine them like this:
This sets up the items:
Setup Items
Events
Map initialization
Conditions
Actions
-------- --------
Set AIItemCount = (AIItemCount + 1)
Set AIItemPrice[AIItemCount] = 900
Set AIItemType[AIItemCount] = Boots of Quel'Thalas +6
-------- --------
Set AIItemCount = (AIItemCount + 1)
Set AIItemPrice[AIItemCount] = 5000
Set AIItemType[AIItemCount] = Crown of Kings +5
-------- --------
Set AIItemCount = (AIItemCount + 1)
Set AIItemPrice[AIItemCount] = 2500
Set AIItemType[AIItemCount] = Orb of Frost
-------- --------
Set AIItemCount = (AIItemCount + 1)
Set AIItemPrice[AIItemCount] = 150
Set AIItemType[AIItemCount] = Gauntlets of Ogre Strength +3
This activates when a computer player enters the base:
AI Buy Item
Events
Unit - A unit enters Human Base <gen>
Unit - A unit enters Orc Base <gen>
Unit - A unit enters Undead Base <gen>
Unit - A unit enters Night Elf Base <gen>
Conditions
((Owner of (Triggering unit)) controller) Equal to Computer
((Triggering unit) is A Hero) Equal to True
Actions
For each (Integer A) from 1 to AIItemCount, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Triggering unit)) Current gold) Greater than or equal to AIItemPrice[(Integer A)]
Then - Actions
-------- Computer Player has enough gold --> Buy item --------
Hero - Create AIItemType[(Integer A)] and give it to (Triggering unit)
Player - Add (-1 x AIItemPrice[(Integer A)]) to (Owner of (Triggering unit)) Current gold
-------- Go back to area - removed location leak --------
Set loc = (Center of Mid <gen>)
Unit - Order (Triggering unit) to Attack-Move To loc
Custom script: call RemoveLocation(udg_loc)
Else - Actions
Those two triggers are all you need for all items.
You can even improve the AI like this:
Setup Items
Events
Map initialization
Conditions
Actions
-------- --------
Set AIItemCount = (AIItemCount + 1)
Set AIItemPrice[AIItemCount] = 900
Set AIItemType[AIItemCount] = Boots of Quel'Thalas +6
Set AIItemHeroClass[AIItemCount] = agility
Set AIItemMinLevel[AIItemCount] = 2
-------- --------
Set AIItemCount = (AIItemCount + 1)
Set AIItemPrice[AIItemCount] = 5000
Set AIItemType[AIItemCount] = Crown of Kings +5
Set AIItemHeroClass[AIItemCount] = all
Set AIItemMinLevel[AIItemCount] = 6
-------- --------
Set AIItemCount = (AIItemCount + 1)
Set AIItemPrice[AIItemCount] = 2500
Set AIItemType[AIItemCount] = Orb of Frost
Set AIItemHeroClass[AIItemCount] = intel
Set AIItemMinLevel[AIItemCount] = 4
-------- --------
Set AIItemCount = (AIItemCount + 1)
Set AIItemPrice[AIItemCount] = 150
Set AIItemType[AIItemCount] = Gauntlets of Ogre Strength +3
Set AIItemHeroClass[AIItemCount] = strength
Set AIItemMinLevel[AIItemCount] = 1
By adding some conditions in the other trigger, the AI now not only buys items, they also buy items for their corresponding class.
That's the first step to a more intelligent AI ^^
You can also make heroes run when below X% HP (and check whether their resurrection is still in cooldown, or if they still have an ankh, or pehaps a heal-spell).
Your spells are completely random right now, which is really a disadvantage.
A more advanced step is aligning the skills the hero chooses with the items it buys - this requires a very flexible system and is a lot harder, but might be worth it.
In either case: if you at least remove the leaks and make a few triggers more efficient as shown above, then the system is acceptable.
But an AI which leaks just isn't good (we don't want AI's to cause lag, do we?)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.