Jump to content

Recommended Posts

Hello and thank you for reading.

 

I'm currently working on a script in which I want a group icon to get bigger when the player mouses over it.

 

onGroupIconOverEnter "(_this select 1) setGroupIcon (Can't figure out)";
onGroupIconOverLeave "(_this select 1) setGroupIcon (Can't figure out)";
 
No matter what I do in the setGroupIcon parameters I can't get it to work.
 
The wiki page is very poorly explained for this command.
 
Thanks in advance if anyone can help.

Share this post


Link to post
Share on other sites

Yes, I already have done that. Neither of those commands pertain to size . 

_markGrp = _this select 0;
_shape = _this select 1;
_color = _this select 2;
_markGrp addGroupIcon [_shape,[0,0]];
_markGrp setGroupIconParams [_color,"",1,true];
onGroupIconOverEnter "(_this select 1) setGroupIcon (Can't figure out)";
onGroupIconOverLeave "(_this select 1) setGroupIcon (Can't figure out)";

Share this post


Link to post
Share on other sites

The third parameter of setGroupIconParams is the scale of the icon, you have it set to 1, so it remains on a scale of 1:1

Share this post


Link to post
Share on other sites

That only affects text size, not icon size. If you look at the setGroupIcon, command it does mention _iconsize but it is very cryptic.

Share this post


Link to post
Share on other sites

Hmm, that is very cryptic.

 

I think it might just be a bad copy paste, all the other examples seem to suggest the parameters are:

[icon ID, icon path, icon offset]

Share this post


Link to post
Share on other sites

Here are the actual parameters:

setGroupIcon [id,path,[offsetX,ofsetY]]

Looks like there's no way to scale it

Share this post


Link to post
Share on other sites

SetGroupIconParams scales the icon in my tests but only in the 3D view, not on the map.

For example create a new mission with only you and another unit (not in your group) called S1 and run the following from the debugConsole...

setGroupIconsVisible [ true, true ];
setGroupIconsSelectable true;
group s1 addGroupIcon [ "b_inf", [0,0] ];
group s1 setGroupIconParams [ side s1 call BIS_fnc_sideColor,groupID group s1,1,true ];
onGroupIconOverEnter {
	_group = _this select 1;
		
	_group setGroupIconParams [[0,1,0,1],groupID _group,5,true]
	
};
onGroupIconOverLeave {
	_group = _this select 1;
	_group setGroupIconParams [ side leader _group call BIS_fnc_sideColor,groupID _group,1,true ];
	
};
When you look at the icon over the head of the S1 it will increase in size and turn green. On the map it will just turn green.

If you do a getGroupIconParams on S1 it also returns some extra parameters that are not documented on the WIKI..

[[0,0.298039,0.6,1],"Alpha 1-2",1,true,false,[0,0,0,1]]

changing these last two params with setGroupIconParams enables waypoints on the map and their color.

Share this post


Link to post
Share on other sites

Not tested, but: _marker = ["MARKER",_group] Call BIS_marta_getParams;  - should provide a group's marker.

Then you might try using setMarkerSizeLocal on the returned marker.

  • Like 1

Share this post


Link to post
Share on other sites

Or just toggle the icon to a larger one on onGroupIconOverEnter.

  • Like 1

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

×