HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Refering to unit properties in a trigger

08-12-2002, 05:42 PM#1
Ari
I'm trying to find a way to refer to the properties/stats/attributes of a particular unit using a trigger. Specifically, I'm trying to refer to a ranged unit's range, but other attributes will come in handy later too.
I'm writing a "rangefinder" module for my program that queries enemy position to calculate its distance from a selected unit, and compares that with the range of a selected unit's attack to tell the user whether or not that unit is within range of my unit. Ideally I'm looking for something of the format archer.attribute.range, or something like that. I can see ways to refer to health, mana, movement, food usage, and a few others, but I want to access *all* of the unit proerties by variables in the same way, if possible. Failing this, of course, I'll simply manually write in a database for the program to use, but that's a) a lame way of doing this and b) pretty time consuming.
Does anyone know a better way?