OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: idleness on 16 Sep 2005, 05:41:10

Title: Name return
Post by: idleness on 16 Sep 2005, 05:41:10
Can anyone tell me the command to return the name of a unit as named in the naming box

all i'm able to get is WEST Alpha Black X when i want to be able to see the funny names that i give my soldiers. Currently using:

TitleText [Format["%1 %2 %3", _me, _you, _him],"Plain Down"]

and all i get is WEST Alpha Black X.

btw, _me,_you,_him are the names of my soldiers.





Title: Re:Name return
Post by: Blanco on 16 Sep 2005, 07:57:17
It should work with the name (http://www.ofpec.com/editors/comref.php?letter=N#name) command
Code: [Select]
TitleText [Format["%1 %2 %3", name _me, name _you, name _him],"Plain Down"]
Title: Re:Name return
Post by: idleness on 16 Sep 2005, 08:19:29
oh no!!!

it doesn't work....

but it does return names like james brown, etc, etc
Title: Re:Name return
Post by: h- on 16 Sep 2005, 10:23:02
You can't return the 'name' field name...

That's actually only a global variable 'assigned' to the unit, so that you can use that 'name' in scripts or triggers to check the unit's conditions and to make it do stuff etc...
Or to keep track of which unit is which, etc..

To really name your unit and use that name you need to make entries in the description.ext file and then use the name function...
Some sort of tutorials should be at Editors Depot...
(me being a lazy bastard no links provided ;D )