Posts: 82
Threads: 18
Joined: Apr 2011
Reputation:
0
Well I recently came back into scripting and all this NPC stuff is new to me. I'm working on a gamemode and I just can't figure out how to make a NPC which is just standing there, doing nothing. All this stuff with the recording just confuses me, can I make an NPC inside my main script and set his skin and what so ever, without having to record stuff or creating a script for him? Will the NPC take a server slot? If so, is it possible to set his ID high enough to the top of the players list?
Toturials weren't really helping me, is it possible to just create it, set its spot and simply leave it there?
Thank you.
Posts: 148
Threads: 5
Joined: Jun 2011
NPC do take player slots
NPC's are hidden from the Player list
Yes you can read this
Make a NPC script only with the folowing
Load the NPC set hes possition angle interior and stuff. And freeze him.
This or just record it with no movement for 20 seconds or somthing
Posts: 82
Threads: 18
Joined: Apr 2011
Reputation:
0
And how do I load it? Do I not need to pass him the login process or something like this?
Oh and, will they cause other players' IDs to skip the ones used by the npcs?
Posts: 148
Threads: 5
Joined: Jun 2011
It wont skip player id's no what it will do is it will give the NPC's the very last id's for example id 500 also you have to goto the login and before you run the dialog or command you have to check if a player is a NPC and send him through a differnt process yes so normal Player login would be under a else statement
Posts: 82
Threads: 18
Joined: Apr 2011
Reputation:
0
Alright, great, so I will just process him through OnPlayerConnect, and what about onplayerspawn and others? Does he passes through them as well?
Thank you btw
Posts: 148
Threads: 5
Joined: Jun 2011
Its ok and yes you use onplayer spawn to set his skin and such his co-ords
and thats fine i dont mind helping
Posts: 631
Threads: 58
Joined: Jun 2010
Reputation:
0
Also don't freak out but if you have your server set to say 500 players, and you have 45 npcs running, it will only show that you have a max players of 455. This is because the npcs are using the other 45 slots so you cannot fake having a hundred players or something like that.
Posts: 82
Threads: 18
Joined: Apr 2011
Reputation:
0
Uh, thank you but for some reason the IDs do not start from zero, and the NPCs take the first available slots...
Posts: 82
Threads: 18
Joined: Apr 2011
Reputation:
0
I don't think its possible really to set an NPC's ID to the last in the list..