What is the difference between the unit.type and the unit.name? Unit.type I understand it's UNIT_WARRIOR, UNIT_ARCHER, etc., but what is unit.name? Warrior Ebert? Bill the Archer? Does every unit have a unique name? If so, what form is the name, alpha or numeric, i.e. "unit Jimmy-Jo-jo" or "unit 56718"
Announcement
Collapse
No announcement yet.
Unit.name vs. unit.type
Collapse
X
-
I don't think I ever actually bothered to test this but I'm pretty sure unit.type returns UNIT_WARRIOR (or 70, rather, which is the index of UNIT_WARRIOR in units.txt) whereas unit.name returns "Warrior".
-
Originally posted by Locutus
I don't think I ever actually bothered to test this but I'm pretty sure unit.type returns UNIT_WARRIOR (or 70, rather, which is the index of UNIT_WARRIOR in units.txt) whereas unit.name returns "Warrior".
Where's my lemur poo? I need to shake some work arounds.
Comment
-
Originally posted by Locutus
Nope, it's defined in gl_str.txt. You can give armies (including armies consisting of 1 unit) unique names, but not units (and you can't retrieve these unique names with SLIC).
How do you name single unit armies?
How do you access the armies name with SLIC? All I see under army is owner, location, size?
Can you automatically assign a single unit to an army and give the army a unique name with SLIC?
Thanks
Comment
-
Originally posted by Locutus
You can set the name in-game with the army manager (press '.', or right-click, select army manager). But like I said, it's not possible to access the name in SLIC.
Comment
-
unit.name if I am right is used in strings .
So you can make a massage box saying
Are warrior is dead
as apposed to
Are unit_warrior is dead
as for the rest i thinck Locutus has delt with it."Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
The BIG MC making ctp2 a much unsafer place.
Visit the big mc’s website
Comment
-
There has always got to be something.
The big mc every time he does \ says anything wrong.
Besides is there a good guide to making strings. I don't thick there is just some rubbish one cobbled together in the slic stuff on apolyton."Every time I learn something new it pushes some old stuff out of my brain" Homer Jay Simpson
The BIG MC making ctp2 a much unsafer place.
Visit the big mc’s website
Comment
Comment