Thread: help please
View Single Post
  #5  
Old 05-14-2003, 12:10 AM
Chicken_l33t Chicken_l33t is offline
Banned
Join Date: Sep 2002
Location: NewZealand
Posts: 467
Chicken_l33t is on a distinguished road
You could set a this.var to 0
then a timeout = 0.05;

then basicly if (timeout)
{
this.var++;
if (playertouchsme)
{
if (this.var <= 30){//Give prize stuff here;}
else {say2 Haha, you lucked out;}
}
timeout = 1;
}

So basicly all that would do is set a timeout to increase and the variable will increase with the timeout (timeout is gonna go up every 1 second) then if the player touchs the NPC while it's bellow 30seconds they get the prize (Obviously I didn't add the prize in becasue I dunno what it is) and if that didn't reach it in the 30seconds it says "Haha, you lucked out".

I dunno if that's posting a full script cause it probally doesnt work I just skimmed through it to show you an outline.
Reply With Quote