
08-08-2001, 08:09 AM
|
|
Psionic Youth
|
 |
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
|
|
|
if(playerenters) timeout=0.05; sets the only instance of timeout for the NPC for the first player who enters. Every subsequent player enters, and it does nothing because the timeout's already in use.
Timereverywhere makes a new timer for that player when it's called. If you don't have timereverywhere before your timeouts, it'll set the NPC's public timeout instead of the NPC's private timeout.
so:
if(playerenters||timeout){
shootball;
timereverywhere;
timeout=2;
}
will shoot a ball at the leader every 2 seconds.
if(playerenters||timeout){
shootball;
timereverywhere;
timeout=2;
}
will shoot a ball at everyone in the level every 2 seconds.
if(playerenters||timeout){
x=(x+1)%62;
timereverywhere;
timeout=0.05;
}
will move the NPC right one tile for EVERY PLAYER IN THE LEVEL.
if(playerenters||timeout){
x=(x+1)%62;
timeout=0.05;
}
will keep it at a constant speed. |
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."
"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
 - My pet, the Levelup Gnome
http://forums.graalonline.com/forums...&postcount=233
|
|
|
|