Jump to content
Sign in to follow this  
desai92

trying to use object name

Recommended Posts

hi i am using a respawn script which enables you to select your spawn upn death but currently it uses a flag and when in game it says flag instead of the given name via the editor, im using this to show the location in game

_index = (uinamespace getvariable "doolb") lbadd (gettext (configfile >> "CfgVehicles" >> typeof _x >> "displayName"));

how can i change it to say name of the flag insetaed of Flag (Great Britain) *the one im using

Share this post


Link to post
Share on other sites

The given name via the editor is just the variable's name which references the object in the given namespace. So by all means that is not the "name" attached to an object, but the name your scripts can use to reference the object.

If you want to "name" an object for later use, you have to manually do so, like using setVariable in the init-field of the object:

this setVariable ["flagName", "NAME_ME_LIKE_ONE_OF_YOUR_FRENCH_FLAGS"];

so you can get that name later (using your analogy):

_index = (uinamespace getvariable "doolb") lbadd (_x getVariable ["flagName", ""]);

Share this post


Link to post
Share on other sites

right i have set the ingame init on the flag too;

camp kino spawn loc

this setVariable ["flagName", "Camp_Kinno"];

mike 1 spawn loc

this setVariable ["flagName", "Mike_1"];

FOB irene spawn loc

this setVariable ["flagName", "FOB_Irene"];

and the init file has this in it

_index = (uinamespace getvariable "doolb") lbadd (_x getVariable ["flagName", ""]) + " near " + (getpos _x call doogetloc));

but when i die it doesn't show any spawn locations... just an empty box

any ideas

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×