Adding Player NICKNAMES & RANDOM SPAWN POINTS (Photon 2 Multiplayer FPS Tutorial E08)

  Рет қаралды 12,219

bananadev2

bananadev2

Күн бұрын

Пікірлер: 82
@hypercharge26
@hypercharge26 2 жыл бұрын
I'm gonna follow this right now! Haven't watched the video but quality looks good so far. Good job!
@bananastutorials
@bananastutorials 2 жыл бұрын
Glad to hear! Best of luck :)
@ToniMussolini
@ToniMussolini 8 ай бұрын
@@bananastutorials I have the problem of network if I create connect a server with “John” I control John but if in the server join another player that player control John and me control the other player and the nickname switch. I’m using unity 2020 I am stuck at tutorial PT2
@SpeddyStudios
@SpeddyStudios Ай бұрын
@@ToniMussolini have u found a fix
@ToniMussolini
@ToniMussolini Ай бұрын
@@SpeddyStudios no
@SpeddyStudios
@SpeddyStudios Ай бұрын
@@ToniMussolini i figured it out on my side go to player prefab and make sure that the Main cam is disabled
@gummyow3059
@gummyow3059 2 жыл бұрын
These videos are stellar. I was wondering if you could do one on being able to see the other players weapon as well as health bars
@mhze
@mhze Жыл бұрын
I agree
@ggwp8618
@ggwp8618 7 ай бұрын
Did you find any thing on that? Where i can also see other Player name and health bar?
@tonywangg
@tonywangg 2 жыл бұрын
Looks great so far
@MrMikhaelJackson
@MrMikhaelJackson 2 жыл бұрын
So cool bro I'm so proud of you! Suggestion: In the following video can you make the other player see your weapon.
@flaviogrillini6818
@flaviogrillini6818 Жыл бұрын
have you solved this issue? i have the same question
@lwpysrc
@lwpysrc 5 ай бұрын
I cannot get the ChangeNickname to work, if i dont type anything then it gives the default nickname which i selected on the start, but once i type anything in the input bar and click to join room my nickname is empty.
@IAMLLIAM
@IAMLLIAM 7 ай бұрын
hey man - i followed all of the steps very closely and still result in none of the scripts working? no errors, but there is absolutely no change on the textmesh on my player prefab. i'm not sure what i'm doing wrong.
@BigMemerMan2
@BigMemerMan2 Жыл бұрын
Great tutorial, one issue. whenever the player dies and respawns for the first time is when the text actually displays the players name. prior to that its the placeholder text
@fraiva22
@fraiva22 Жыл бұрын
when i try to do the multiple spawn points this happens: transform[]' does not contain a definition for 'position' and no accessible extension method 'position' accepting a first argument of type 'Transform[]' could be found (are you missing a using directive or an assembly reference?
@feimk7229
@feimk7229 Жыл бұрын
public override void OnJoinedRoom() { base.OnJoinedRoom(); Debug.Log("Joined a room"); roomCam.SetActive(false); // Choose a random spawn point from the array Transform spawnPoint = spawnPoints[Random.Range(0, spawnPoints.Length)]; // Instantiate the player at the chosen spawn point GameObject _player = PhotonNetwork.Instantiate(player.name, spawnPoint.position, Quaternion.identity); _player.GetComponent().IsLocalPlayer(); _player.GetComponent().IsLocalPlayer = true; } public void RespawnPlayer() { // Choose a random spawn point from the array Transform spawnPoint = spawnPoints[Random.Range(0, spawnPoints.Length)]; // Instantiate the player at the chosen spawn point GameObject _player = PhotonNetwork.Instantiate(player.name, spawnPoint.position, Quaternion.identity); _player.GetComponent().IsLocalPlayer(); _player.GetComponent().IsLocalPlayer = true; _player.GetComponent().RPC("SetNickname", RpcTarget.AllBuffered, nickname); } That was the correction
@QuackQuirk
@QuackQuirk 6 ай бұрын
same u fix it?
@fraiva22
@fraiva22 6 ай бұрын
@@QuackQuirk nah
@QuackQuirk
@QuackQuirk 6 ай бұрын
@@fraiva22 i did finally
@PurpleFNYT
@PurpleFNYT 7 күн бұрын
@@QuackQuirk thanks for explianing greatly how you fucking fixed it "i did finnaly" really fucking helps :D
@toogus8332
@toogus8332 2 ай бұрын
i have a question when i look up i can see my username how to fix that?
@sofykokoreva3107
@sofykokoreva3107 10 ай бұрын
I seem to do everything by the video and still get one problem - the player's own name is shown on the floor next to it. Other players names are fine. Can you help me pls
@meliodassama8751
@meliodassama8751 8 ай бұрын
add a boolean in lookatcamera script or you can use health script boolean that is if (_player.GetComponent().isLocalPlayer == false) { transform.LookAt(Camera.main.transform); }
@jayvardhanbhaskar7486
@jayvardhanbhaskar7486 Жыл бұрын
Hey! I have been following all your videos from the starting and it has been a very nice journey. But I am having a issue at 7:04 in the video when you drag the Text into the Nickname Text. I am unable to get the two boxes which you got. Can you please help.
@bananastutorials
@bananastutorials Жыл бұрын
Make it public
@bananastutorials
@bananastutorials Жыл бұрын
public Text
@bananastutorials
@bananastutorials Жыл бұрын
In the code
@jayvardhanbhaskar7486
@jayvardhanbhaskar7486 10 ай бұрын
@@bananastutorials Thanks a lot man..
@SpeddyStudios
@SpeddyStudios Ай бұрын
after i added random spawn points anytime some one joioned / died the new joiner can controll the old player and vise versa
@SpeddyStudios
@SpeddyStudios Ай бұрын
i fixed it
@haybale7483
@haybale7483 Ай бұрын
@@SpeddyStudios How did you fix this, i've been having the same issue?
@SpeddyStudios
@SpeddyStudios Ай бұрын
@haybale7483 i got ya broski check your player prefab make sure the main cam is still there but make sure its not active if that dont fix it idk
@frizzyjuice3308
@frizzyjuice3308 24 күн бұрын
hey dont know if youre still active on this series but when i get into the actual game after naming my player, it says in the player setup that the name is still blank. I also got one error and one warning. the warning said "Received RPC "SetNickname" for viewID 0 but this PhotonView does not exist! Was remote PV. Remote called. By: #01 '' Maybe GO was destroyed but RPC not cleaned up. UnityEngine.Debug:LogWarning (object)" and the error said "Illegal view ID:0 method: SetNickname GO:Player UnityEngine.Debug:LogError (object)" dont know if you can fix this but it was worth a try also i need your keyboard in my life
@fraiva22
@fraiva22 Жыл бұрын
Quick Question! how do I limit the amount of characters that can be used for a username
@bigdogediting
@bigdogediting 2 ай бұрын
lol, your friends been going crazy?
@fraiva22
@fraiva22 2 ай бұрын
@@bigdogediting nah i js knew it would be annoying as hell in the long run lol
@ACasualDev
@ACasualDev Ай бұрын
I know this is a year old, but figured i put an answer for anyone else looking for the same thing. in the Room Manager Script add [SerializeField] private TMP_InputField nameinput; [SerializeField] private int maxCharacters = 10; and in the start method add if (nameinput != null) { nameinput.characterLimit = maxCharacters; } That will limit how many characters for a username or player name
@nerdyHellion
@nerdyHellion Жыл бұрын
I'm getting this error: "NullReferenceException: Object reference not set to an instance of an object FaceObjectToCamera.Update () (at Assets/FaceObjectToCamera.cs:15)" Is it possibly related to warnings I'm getting about "Assets\PlayerSetup.cs(11,23): warning CS0108: 'PlayerSetup.camera' hides inherited member 'Component.camera'. Use the new keyword if hiding was intended." and "'Weapon.camera' hides inherited member 'Component.camera'."?
@juzerbaatwala8868
@juzerbaatwala8868 11 ай бұрын
make sure your player camera is tagged as "'Main Camera" in the inspector of the player camera
@par6749
@par6749 7 ай бұрын
@@juzerbaatwala8868 same here it is "Main Camera" but still same error
@tozukoi2969
@tozukoi2969 Жыл бұрын
for some reason i can not see the text do i have to add photon view to it
@tozukoi2969
@tozukoi2969 Жыл бұрын
when it plays it only shows a blue box with a capital T inside it but not the actual name
@tozukoi2969
@tozukoi2969 Жыл бұрын
its all good i fixed it by completley restarting :)
@bananastutorials
@bananastutorials Жыл бұрын
no, make sure you’re calling the RPC correctly and that the code is right. maybe it’s flipped 180 degrees
@sabalax
@sabalax 9 ай бұрын
i cant click button or cant enter my nickname can someone help
@Muao4472
@Muao4472 9 ай бұрын
create a event system (UI)
@MrMikhaelJackson
@MrMikhaelJackson 2 жыл бұрын
sorry to bother you but it gives me a null reference exception when the name UI screen pops up and I can see the other player in the room cam.
@MrMikhaelJackson
@MrMikhaelJackson 2 жыл бұрын
and it's because of the face object to camera script
@bananastutorials
@bananastutorials 2 жыл бұрын
Make sure all objects are referenced in the room manager
@MrMikhaelJackson
@MrMikhaelJackson 2 жыл бұрын
got it its working now:)
@YoNatrix
@YoNatrix Жыл бұрын
in the nickname if you are alone in the server the text points at the player and its weird how do i make so that i cant see my own text?
@bananastutorials
@bananastutorials Жыл бұрын
Disable it using the on local player bit in the player setup
@bnenanadev
@bnenanadev 7 ай бұрын
paste "nicknameText.gameObject.SetActive(false);" under isLocalPlayer() Prevents local player from seeing their own text
@InfernalHedgehog
@InfernalHedgehog Жыл бұрын
I have a problem where the player can see their own nametag and its permanently on the floor next to them
@InfernalHedgehog
@InfernalHedgehog Жыл бұрын
oh no its fine i fixed it
@InfernalHedgehog
@InfernalHedgehog Жыл бұрын
i realised that i used the 'create empty parent' button and assumed that it would zero all of the transforms on the TMP and apply them to the parent but it didnt.
@polyhally
@polyhally Жыл бұрын
the nametags are not replicating like what so ever when a new player joins the game the nickname is ""
@bubacisko5181
@bubacisko5181 Жыл бұрын
It doesnt work for me. It doesnt show up my character in playersetup
@ImGoneButItWasntAlwaysThisWay
@ImGoneButItWasntAlwaysThisWay Жыл бұрын
Same. Have you found a fix?
@bananastutorials
@bananastutorials Жыл бұрын
make the variable public
@mistersquido
@mistersquido 11 ай бұрын
hi i dont know if you still react but i cant use the input test and button they dont work for me
@exemptrook3927
@exemptrook3927 9 ай бұрын
make sure that the button and input field are both children of the name screen, make sure that they aren't children of anything else except the name screen, if this is what u meant
@mistersquido
@mistersquido 9 ай бұрын
@@exemptrook3927 the event system was in a panel and not on the button
@SalsabilLotfy
@SalsabilLotfy 10 ай бұрын
I have a problem. the player can only see the names of players who entered the room after him , but whoever entered before him has no name displayed. can anyone tell me why is that happening?
@ToniMussolini
@ToniMussolini 8 ай бұрын
I have the problem of network if I create connect a server with “John” I control John but if in the server join another player that player control John and me control the other player and the nickname switch. I’m using unity 2020 I am stuck at tutorial PT2
@par6749
@par6749 7 ай бұрын
@@ToniMussolini watch further he makes a player setup script and fixes the issue
@LuntraYT
@LuntraYT 11 ай бұрын
I have text not on the player, but on top, what should I do?
@thehck3r096
@thehck3r096 Жыл бұрын
nice tutor but one problem. if you look up you can see your name
@juzerbaatwala8868
@juzerbaatwala8868 11 ай бұрын
yes same issue
@bnenanadev
@bnenanadev 7 ай бұрын
in PlayerSetup add this line of code under IsLocalPlayer() : nicknameText.gameObject.SetActive(false); Makes it so the local player can't see their own name
@PieEater42
@PieEater42 4 ай бұрын
Same, does anyone have a solution?
@irafaisal8019
@irafaisal8019 2 жыл бұрын
Can u plz share this project with me
@bananastutorials
@bananastutorials 2 жыл бұрын
No
@dontCallMe..
@dontCallMe.. Жыл бұрын
lol@@bananastutorials
@rblxl3g3nd66
@rblxl3g3nd66 Жыл бұрын
Doesn't work. NullReferenceException: Object reference not set to an instance of an object FaceObjectToCamera.Update () (at Assets/FaceObjectToCamera.cs:11)
@bananastutorials
@bananastutorials Жыл бұрын
that error means nothing, look at game object setup and make sure player camera has main camera tag
@par6749
@par6749 7 ай бұрын
@@bananastutorials but it does and i still get the error
@itamarkamar3566
@itamarkamar3566 10 ай бұрын
After adding another spawnpoint, my player is being spawned multiple times every time i die. Why is that?
@SpeddyStudios
@SpeddyStudios Ай бұрын
have u found a fix?
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН
7 DEVS Make a GAME without COMMUNICATING! (centipede edition)
17:16
Blackthornprod
Рет қаралды 1,2 МЛН
I Beat Minecraft From One Grass Block
35:27
Beppo
Рет қаралды 7 МЛН
How Do Game Devs NOT Overscope??
9:04
Green Light Dev
Рет қаралды 19 М.
How To Make a Multiplayer Game in VR? - Photon
12:21
immersive insiders
Рет қаралды 11 М.
6 DEVS Make a GAME without COMMUNICATING!!
13:53
Blackthornprod
Рет қаралды 1,8 МЛН
Can I 100% Superliminal and Get a Refund?
23:36
Gronf
Рет қаралды 404 М.
Synced Third Person WEAPON SWITCHING (Photon Pun 2 FPS EO13)
4:37
Making a Game About Weak Points
21:27
Emis
Рет қаралды 1,1 МЛН
8 DEVS Make a GAME without COMMUNICATING!
13:21
Blackthornprod
Рет қаралды 997 М.
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН