Thread: checking...
View Single Post
  #2  
Old 05-12-2007, 05:21 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Well, 'touching' the NPC is only sent while the player is moving and 'colliding' with the NPC. I suppose what you could do is something like...
PHP Code:
//#CLIENTSIDE
function onCreated() {
  
this.check=0;
}

function 
onPlayertouchsme() {
  if (
this.check==0setTimer(3);
  else {
    
// Do whatever you want if they're still touching it after 3 seconds.
  
}
}

function 
onTimeout() {
  if (
this.check==0) {
    
this.check=1
    
setTimer(.1);
  } else 
this.check=0;

But... they'd still have to be pressing against the NPC, not just standing there next to or in it.
As for the if they're still firing, again, you should use timeouts and variables.
Reply With Quote