Welcome to Age of Mythology Heaven
Welcome
Downloads Home
Review Guidelines
Main site
Forums
Code of Conduct
Help
Search

Advanced Search
AI Files
Home
New Releases
New Reviews
New Comments
Top-Rated

Submit File
Browse Categories
New Files

Downloads Home » AI Files » kbProtoUnitIsType function

Download File Post Review Post Comment

kbProtoUnitIsType function

Author File Description
Magnum Pi
File Details
Version: AoM: The Titans
Included in this download is a single XS file called kbProtoUnitIsType. It contains a single function that goes by the same name. To this function in your own AIs be sure to add 'include"kbProtoUnitIsType.xs";' at the top of the AI file you want to use it in.

Basically, this function behaves the same as the 'kbUnitIsType()' function supplied to us by ES, except that the first parameter is a ProtoUnit (or base UnitType) not a UnitID. For example, the result of the evaluation:
kbProtoUnitIsType(cUnitTypeFarm, cUnitTypeResource);
is 'true' because the Farm unit DOES include the 'Resource' unittype ilk. If the evaluation were:
kbProtoUnitIsType(cUnitTypeDwarf, cUnitTypeMythUnit);
the result would be 'false' because Dwarves are not classified as MythUnits.

All the data in this file is based upon the default AoMX protox file if you have a mod that adds units, or adds/removes some proto units from certain groups, you will need to update this file to accomidate such changes. Each proto has its own entry in this file, so to add/remove unittype classes, just search find the entry for the respective proto and modify accordingly. Much of this information can be found in comments in the file itself.

Enjoy! I hope you find this function as useful as I do!
AuthorComments & Reviews   ( All | Comments Only | Reviews Only )
invent00r Only AoT.

Oh you broke my heart.

Post Review Post Comment

HGDL v0.8.0

Login
Forum Username:


Password:




Create a new account
Forgot password?
Statistics
Downloads:509
Favorites: [Who?]0
Size:34.62 KB
Added:05/05/09
Recently Updated