Thread: Timer
View Single Post
  #8  
Old 03-18-2008, 08:03 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
NPC1
PHP Code:
// NPC made by Chompi
//#CLIENTSIDE
if (created) {
  
setimg block.png;
  
level.timer 0;
  
level.time 0;
  
timeout 0.05;
}
if (
playertouchsme) {
  if (
level.timer == 0) {
    
level.timer 1;
    
timeout 0.05;
  }
}
if (
timeout) {
  if (
level.timer == 1) {
    
level.time += 0.05;
    
message Touch the other blockhurry!;
    
timeout 0.05;
  }else
    
message Touch me to start the timer!;

NPC2
PHP Code:
// NPC made by Chompi
//#CLIENTSIDE
if (created) {
  
setimg block.png;
  
timeout 0.05;
}
if (
timeout) {
  if (
level.time 0)
    
message #v(level.time);
  
timeout 0.05;
}
if (
playertouchsme) {
  if (
level.timer == 1) {
    
level.timer 0;
    
message Player touched me in #v(level.time) seconds!;
    
level.time 0;
  }

Bah, long time since I did gs1 but they should work in the editor
__________________
Reply With Quote