Jump to content
fernandolvferreira

How to get Military Symbols to display Group Names

Recommended Posts

Sorry if this has been answered already, but I couldn't find it anywhere...

 

I placed the Military Symbols module and put this in its init: 

setGroupIconsVisible [true,false];

So now I can see the symbols for groups in the map.

 

Now I would like for it to show the group's ID next to the symbol.

 

Example. I have two groups of Cobra's flying around. I'd like it to show "Phantom 1" and "Phantom 2" next to its respective symbols.

I imagine it has something to do with SetGroupId, but I can't find any parameter in the module in order for it to display it.

 

I'd appreciate any help.

Thank!

Share this post


Link to post
Share on other sites
4 minutes ago, fernandolvferreira said:

Sorry if this has been answered already, but I couldn't find it anywhere...

 

I placed the Military Symbols module and put this in its init: 


setGroupIconsVisible [true,false];

So now I can see the symbols for groups in the map.

 

Now I would like for it to show the group's ID next to the symbol.

 

Example. I have two groups of Cobra's flying around. I'd like it to show "Phantom 1" and "Phantom 2" next to its respective symbols.

I imagine it has something to do with SetGroupId, but I can't find any parameter in the module in order for it to display it.

 

I'd appreciate any help.

Thank!

 

hi

have you tried https://community.bistudio.com/wiki/setGroupIconParams ? I think the second parameter is what your looking for.

 

_grp setGroupIconParams [[0,0,0,0],"Phantom 1",1,true];

 

Share this post


Link to post
Share on other sites

Thanks you! I tried searching the BIKI for this, but I couldn't find anything besides the Military Symbols module...

 

In the case, I would have to insert each group's name manually or it would detect each group's ID automatically and do the job?

Share this post


Link to post
Share on other sites
1 minute ago, fernandolvferreira said:

Thanks you! I tried searching the BIKI for this, but I couldn't find anything besides the Military Symbols module...

 

In the case, I would have to insert each group's name manually or it would detect each group's ID automatically and do the job?

 

yes the command must be called for each group.

but you could write:

 

_grp setGroupIconParams [[0,0,0,0],str _grp,1,true];

 

and the group's name would be used. use SetGroupId to change group's name.

Share this post


Link to post
Share on other sites
19 minutes ago, fernandolvferreira said:

Would this work?

 


{
_callsign = groupID _x;
_x setGroupIconParams [[0,0,0,0],str _callsign,1,true];
} forEach group;

 

 

change this: 

} forEach group;

 

to this:  

} forEach allgroups;

 

that should work in theory

 

also you dont need str in "str _callsign" because the _callsign is already a string

Share this post


Link to post
Share on other sites
1 hour ago, gc8 said:

 

change this: 

} forEach group;

 

to this:  

} forEach allgroups;

 

that should work in theory

 

also you dont need str in "str _callsign" because the _callsign is already a string

 

Thanks, man!

 

I'll try that as soon as I get home...

 

One more question, this mission's units are spawned by a headless client, so this should be at the end of the script that spawns the units, right? If so, the command will work only locally or will it be broadcasted throughout the server?

Share this post


Link to post
Share on other sites
7 minutes ago, fernandolvferreira said:

 

Thanks, man!

 

I'll try that as soon as I get home...

 

One more question, this mission's units are spawned by a headless client, so this should be at the end of the script that spawns the units, right? If so, the command will work only locally or will it be broadcasted throughout the server?

 

yes I would run the script after all units have spawned. but I cannot answer the question about if the command is broadcasted, havent done that much multiplayer coding my self. hope some one else knows.

Share this post


Link to post
Share on other sites
6 hours ago, gc8 said:

 

yes I would run the script after all units have spawned. but I cannot answer the question about if the command is broadcasted, havent done that much multiplayer coding my self. hope some one else knows.

It didn't work...

Spoiler

File C:\Users\Fernando\Documents\ArmA 2 Other Profiles\Lucchesi\missions\Batalha-Zargabad_AI_ONLY.Zargabad\callsigns.sqf, line 3
Error in expression <gabad\callsigns.sqf"

{
_name = groupID _x;
_x setGroupIconParams [[0,0,0,0], _n>
  Error position: <_x;
_x setGroupIconParams [[0,0,0,0], _n>
  Error Missing ;

 

Share this post


Link to post
Share on other sites
11 hours ago, fernandolvferreira said:

It didn't work...

  Reveal hidden contents

File C:\Users\Fernando\Documents\ArmA 2 Other Profiles\Lucchesi\missions\Batalha-Zargabad_AI_ONLY.Zargabad\callsigns.sqf, line 3
Error in expression <gabad\callsigns.sqf"

{
_name = groupID _x;
_x setGroupIconParams [[0,0,0,0], _n>
  Error position: <_x;
_x setGroupIconParams [[0,0,0,0], _n>
  Error Missing ;

 

 

can you post the whole code that gives the error please? 

Share this post


Link to post
Share on other sites
1 hour ago, gc8 said:

 

can you post the whole code that gives the error please? 

 

script

{
_callsign = groupID _x;
_x setGroupIconParams [[0,0,0,0], _callsign,1,true];
} forEach allGroups;

 My RPT got lost for some reason, but the previous  post shows the error...
 

Share this post


Link to post
Share on other sites
1 minute ago, fernandolvferreira said:

 

script


{
_callsign = groupID _x;
_x setGroupIconParams [[0,0,0,0], _callsign,1,true];
} forEach allGroups;

 My RPT got lost for some reason, but the previous  post shows the error...
 

 

strange I get no error when running that script in console. But I'm running arma 3, maybe that's why. But the wiki says the command was introduced in arma 2.

Share this post


Link to post
Share on other sites
1 minute ago, fernandolvferreira said:

I tried a lot of combinations, the problems seems to be in the syntax of groupID I can't figure how to get the parameter out of it...

 

ok I according to wiki groupID is for arma3. 

 

So use "str _x" instead.

 

Share this post


Link to post
Share on other sites
1 hour ago, gc8 said:

 

ok I according to wiki groupID is for arma3. 

 

So use "str _x" instead.

 

Thanks, man. That did the trick!

 

In case anyone needs it, here it is...

{
	_callsign = str _x;
	_x setGroupIconParams [[0,0,0,0], _callsign,1,true];
	//hint format ["Callsign %1", _callsign];
} forEach allgroups;

 

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

×