I didnt read all the way to the third page but.....
In order for more people to be in the room playerenters will have to be triggered.... *DUH* you dont need a timeout loop to lag the server any or little just a simple
NPC Code:
if(created) {
this.minplayers=5;
}
if(playerenters) {
if(playerscount>=this.minplayers){
blah();
}
}
THat would be sufficient right or did i miss something?
[edit]
NPC Code:
if(created) {
this.minplayers=5;
this.mode=0;
this.check=0;
}
if(playerenters||playerleaves) {
this.mode=(playerscount>=this.minplayers? 1 : playerscount<this.minplayers? 0 );
if(this.mode!==this.check) {
door();
}
}
function door() {
this.check=this.mode
if(this.mode=1) {//Opening
blah;
}
if(this.mode=0) {//Closing
blah;
}
}
THeres a more complex edit it should work *goez to zleep im tired*