Page 1 of 1

Need a script to show/hide the name of an specific player

Posted: Fri May 14, 2021 6:17 pm
by ManiacLoser
Hi there, I'm new here, anyway...
So I'm making an campaign map and as I don't know how to script I just copy and paste official campaigns map codes, but I haven't found a script which would help me to show/hide the name of a boss.

I want to make a boss similar to funnyman (except a little improvised) he will come out from doors use a weapon and then get out, as it is improvised everytime he "gets out" he gets teleported to an inaccessible section, I don't want players to see that he randomly teleported, that's why I need the hide name script, the show one I need it when he comes back.

I'll be waiting for any answers, thanks for reading.

Re: Need a script to show/hide the name of an specific player

Posted: Wed May 26, 2021 1:34 am
by SomeOne7

Re: Need a script to show/hide the name of an specific player

Posted: Mon May 31, 2021 2:58 pm
by ManiacLoser
I specifically asked for a script to hide/show the name in middle of a game, not to hide the name before the game starts, the problem here is that I don't want that people see that the boss randomly teleported, and youtube links are not helpfull at all which also shows the lazyness here.

Re: Need a script to show/hide the name of an specific player

Posted: Tue Jun 01, 2021 8:44 am
by Odex64
call HideName within the trigger

Code: Select all

public void HideName(TriggerArgs args)
{
    if (args.Sender is IPlayer)
    {
        IPlayer player = (IPlayer) args.Sender;
        // if (player.CustomId == "theBoss") further check
        player.SetNametagVisible(false);
    }
}
You'd better join the discord server if you want immediate responses.