There's a function in the trigger editor called "catalog". It allows you to retrieve ANY value from the data editor and use it in your triggers as a variable or whatever else you need it for. Im going to post an example/tutorial as soon as I can.
CatalogFieldValueGet("int" catalog, "string entry", "string" field, "int" player) - this is your function
-int: catalog, this value ranges from 0-50, there is a different catalog for every different category(50 is weapons, 46 is unit data, etc...)
-string:entry, this value is the unit ID that you wish to find a value for(NOT the name, in order to view this, you must select "view raw data")
-string:field, this is the field value you are searching for(range, damage, lifearmor, period, etc.....)
-int:player, not sure what this means, because every player shares the same data atm...
-=Examples=-
1) CatalogFieldValueGet("50" catalog, "marine" entry, "range" field, "1" player) - Should return a value of 5, which is the range of a marine.
2) CatalogFieldValueGet("46" catalog, "marine" entry, "lifearmor" field, "1" player) - Should return a value of 0, which is the armor of a marine, if infantry armor has been researched then it will be higher of course.
http://www.sc2mapster.com/api-docs/functions/catalog-field-value-get/- this is a list of all 50 catalog values
Post has been edited 2 time(s), last time on May 30 2010, 7:52 pm by 13Stallion.
None.