2ndwolf
February 16, 2013, 4:19pm
1
There could be an option in the serverconfig to add certain npcs to the level the player is in once he connects.
An example of a use it could have:
if(created){
for(this.i=0;this.i<weaponscount;this.i++){
callweapon this.i,playerconnects;
}
}
So it doesn’t interfere with other player’s npcws i’d do
if(playerconnects&&this.init==0){
this.init=1;
timeout = 0.05;
}
Because I don’t think using playerenters is convenient.
It could also be used to welcome the player, warp players after an update, inform them of new changes etc…
That’s hackish but from what I’ve seen of the code it seems doable.
tricxta
February 16, 2013, 5:15pm
2
You can’t do
if (playerenters && this.init == 0){
this.init = 1;
}
Why? You confused me a tad bit.
2ndwolf
February 16, 2013, 5:25pm
3
Doesn’t playerenter work on npcws only when a player enters a new level and not when he connects?
tricxta
February 16, 2013, 6:09pm
4
A player connecting is seen as a player entering a level. You should’ve done some tests prior to this thread.
2ndwolf
February 16, 2013, 6:19pm
5
I had… maybe my memory is playing me tricks.
Delete this thread then
Spooon
February 17, 2013, 11:25am
7
Just use created instead of playerenters in the wNPC. created only breaks in level NPCs because of a problem with level leaders.
Codr
February 17, 2013, 1:27pm
8
It’s not broken if it’s functioning as intended.
tricxta
February 17, 2013, 3:07pm
9
Yeno, if (created) does exactly what it’s labelled, it’s only called on the serverside creation which is triggered by a single clientside instantiation, I’m pretty sure I remember testing this.