Page 2 of 2

Re: User you are spectating

Posted: 30 Sep 2014, 13:33
by Eole
oliverde8 wrote:Can you please fix this?
Bug confirmed, we will investigate it.
undef.de wrote:Should this not be easily possible with the (unfortunately unavailable in TM) CTmMode::Spectators?
The Players array in the manialink scripts contains all players on the server(players and spectators). With something like this you should be able to differentiate spectators from players :

Code: Select all

foreach (Player in Players) {
	if (Player.RequestsSpectate) {
		// Spectator
	} else {
		// Player
	}
}

Re: User you are spectating

Posted: 01 Oct 2014, 17:30
by Eole
oliverde8 wrote:Hi, I confirm there is a problem.
I had hope it was fix I know it was crazy for me to hope for that so soon.

I put this code inside a Manialinks maniascript's while loop :

Code: Select all

if (GUIPlayer != Null) {
    log("GUIPlayer is "^GUIPlayer.Name);
} else {
    log("GUIPlayer is NULL");
}
I did see null while switching between players but beside that always my nickname was in the logs never saw the nickname of the player I spectate.
I tried in Script & Legacy Rounds mode as I needed the feature there.

Can you please fix this?
xbx fixed the bug, it will be available in the next update.

Re: User you are spectating

Posted: 01 Oct 2014, 18:01
by reaby
I maybe can also thank for this !

Many thanks :thx:

Re: User you are spectating

Posted: 18 Oct 2014, 09:53
by oliverde8
Thanks I confirm fixed :thumbsup:

many thanks

Re: User you are spectating

Posted: 10 Nov 2014, 17:45
by djhubertus
Eole wrote: foreach (Player in Players) {
if (Player.RequestsSpectate) {
// Spectator
} else {
// Player
}
}
I made something like this and it doesn't work. It's always invisible

Code: Select all

Text UpdateCaptureMessageVisibility(Boolean _Show)
{
  return """
<manialink version="1" name="Elite:GoalIsReadyToCapture">
<frame hidden="1" id="Frame_Ready">
 <quad posn="0 75 100" sizen="70 10" bgcolor="FFFA" style="Bgs1" substyle="BgList" halign="center"/>
 <label posn="0 72.5 101" textsize="3" textfont="Play.font.gbx" halign="center" text="$sThe goal is ready to capture">
 <script><!--
 main()
  {
    while(True)
    {
      yield;
      declare F_Ready <=> (Page.GetFirstChild("Frame_Ready") as CMlFrame);

      if({{{_Show}}})
      {
        if(InputPlayer.RequestSpectate) F_Ready.Show();
        else F_Ready.Hide();
      }
      else F_Ready.Hide();
    }
  }
 --></script>
</manialink>
  """;
}

Re: [FIXED]User you are spectating

Posted: 10 Nov 2014, 18:17
by Eole
You forgot to close the

Code: Select all

<frame hidden="1" id="Frame_Ready">
with a

Code: Select all

</frame>

Same thing for the label, it should be

Code: Select all

<label posn="0 72.5 101" textsize="3" textfont="Play.font.gbx" halign="center" text="$sThe goal is ready to capture" />
with a / at the end.

Re: [FIXED]User you are spectating

Posted: 10 Nov 2014, 18:45
by djhubertus
rofl, I should buy new glasses :thx:

Re: [FIXED]User you are spectating

Posted: 10 Nov 2014, 18:47
by Eole
It happened to me so many times ... Now it's the first thing I check when a manialink script doesn't work. :mrgreen: