I'm reading the post: https://smartfoxserver.com/blog/ways-of-working-with-npcs-in-a-multiplayer-game-p-2/
i'm try to login in Unity execute with same user name with NPC user i'm creat in extension. but it always creat new user is not NPC User????
How to login Unity's execute as NPC user??????
thank you!!
How to login Unity's execute as NPC user??????
-
- Posts: 14
- Joined: 03 May 2019, 15:04
Re: How to login Unity's execute as NPC user??????
Hi,
your question is not very clear.
First of all NPCs are created server side, so they don't need to "login in Unity". When a real User logs from client side to the server he will be able to interact with the NPCs once they are in the same Room.
Cheers
your question is not very clear.
First of all NPCs are created server side, so they don't need to "login in Unity". When a real User logs from client side to the server he will be able to interact with the NPCs once they are in the same Room.
Cheers
-
- Posts: 14
- Joined: 03 May 2019, 15:04
Re: How to login Unity's execute as NPC user??????
In this blog has image:
What exactly "NPC client"?? It is NPC creat by extension and controlled by extension code???
Why NPC client is in different app with Smartfox Server??
What exactly "NPC client"?? It is NPC creat by extension and controlled by extension code???
Why NPC client is in different app with Smartfox Server??
Re: How to login Unity's execute as NPC user??????
In the article you have mentioned we explain two different ways to manage NPCs.
1) Create NPCs and manage their logic on the server side
2) Create NPCs and manage their logic using a client application that runs on a different machine running in the local network
So it seems you want to use the 2nd approach.
How to login an NPC using this system? The same exact way you would login any other client. Send a LoginRequest from your NPC client.
If you're not familiar with the basics take some time reviewing the first tutorials from the documentation:
http://docs2x.smartfoxserver.com/Exampl ... troduction
Cheers
1) Create NPCs and manage their logic on the server side
2) Create NPCs and manage their logic using a client application that runs on a different machine running in the local network
So it seems you want to use the 2nd approach.
How to login an NPC using this system? The same exact way you would login any other client. Send a LoginRequest from your NPC client.
If you're not familiar with the basics take some time reviewing the first tutorials from the documentation:
http://docs2x.smartfoxserver.com/Exampl ... troduction
Cheers
-
- Posts: 14
- Joined: 03 May 2019, 15:04
Re: How to login Unity's execute as NPC user??????
i'm did it, but have problem!
i creatNPC in server extension, and then login with same name in unity, but flag isNPC always false in Zone Monitor???
what is wrong?
i creatNPC in server extension, and then login with same name in unity, but flag isNPC always false in Zone Monitor???
what is wrong?
Re: How to login Unity's execute as NPC user??????
If the NPC is created from server side, then it already exists as a User on the server and therefore you don't need to create another one from client side.
In other words, you have to choose one of the two approaches outlined in the article, not use both at the same time.
Cheers
In other words, you have to choose one of the two approaches outlined in the article, not use both at the same time.
Cheers