Page 1 of 2
Hide markers when not in field of view
Posted: 05 Mar 2013, 18:58
by Fadden
Hi,
I would display the markers added from script (not the players' labels) only if there are in the field of view. By default the display is :
In this screen the 2 markers "Goal" are above 2 poles. But as I can't see these poles, I would that these markers aren't shown for me.
I haven't found any mathod to do that. Is this possible ?
Re: Hide markers when not in field of view
Posted: 05 Mar 2013, 23:26
by steeffeen
i don't think there is an easy way to do that :/
the only possibility which i can image is doing something like:
- build the markers with manialinks
- check in the script of the manialink if the player is heading in direction of the marker and hide specific markers accordingly
Re: Hide markers when not in field of view
Posted: 06 Mar 2013, 09:43
by Akbalder
I just saw that it's possible to add visibility="WhenVisible" on the markers.
Re: Hide markers when not in field of view
Posted: 06 Mar 2013, 10:54
by steeffeen
Akbalder wrote:I just saw that it's possible to add visibility="WhenVisible" on the markers.
w00t?! that would be nice

Re: Hide markers when not in field of view
Posted: 06 Mar 2013, 11:15
by Eole
There's indeed a "visibility" parameter on the <marker /> tag now. It can take the same values than the player's markers, which are:
- Never
- Always
- WhenInFrustum (the object is in the field of view of the player, even behind a wall)
- WhenVisible (the object is in the field of view of the player, but not behind a wall)
- WhenInMiddleOfScreen
Re: Hide markers when not in field of view
Posted: 06 Mar 2013, 13:32
by Fadden
Very nice thanks !
Akbalder how do you find this before Eole said this ? Random tries ?^^
I haven't see this parameter in the doc
Re: Hide markers when not in field of view
Posted: 06 Mar 2013, 13:36
by steeffeen
Eole wrote:There's indeed a "visibility" parameter on the <marker /> tag now. It can take the same values than the player's markers, which are:
- Never
- Always
- WhenInFrustum (the object is in the field of view of the player, even behind a wall)
- WhenVisible (the object is in the field of view of the player, but not behind a wall)
- WhenInMiddleOfScreen
Nice! Thanks
Fadden wrote:Very nice thanks !
Akbalder how do you find this before Eole said this ? Random tries ?^^
I haven't see this parameter in the doc
Yep, Akbalder: Tell us your secret!

Re: Hide markers when not in field of view
Posted: 06 Mar 2013, 14:18
by Akbalder
Fadden wrote:Akbalder how do you find this before Eole said this ? Random tries ?^^
Read all the the Maniascript files of Nadeo!
(It was in the melee gamemode)
Re: Hide markers when not in field of view
Posted: 06 Mar 2013, 17:19
by steeffeen
Akbalder wrote:Fadden wrote:Akbalder how do you find this before Eole said this ? Random tries ?^^
Read all the the Maniascript files of Nadeo!
(It was in the melee gamemode)
damn it. i only read the new ones

Re: Hide markers when not in field of view
Posted: 06 Mar 2013, 17:53
by TGYoshi
Or simply read the maniascript source file.
Code: Select all
enum ELabelsVisibility {
None,
Never,
Always,
WhenInFrustum,
WhenVisible,
WhenInMiddleOfScreen,
};