Thread: Npc to Npc
View Single Post
  #9  
Old 02-03-2011, 04:55 AM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Maybe show your current script of the 2 NPCs?

Should be as simple as this:

NPC 1
PHP Code:
function onCreated(){
  
this.level.obj1 this;
}

function 
onPlayerTouchsMe(){
  
this.level.obj2.wasTouched();
}

public function 
wasTouched(){
  
this.hide();

NPC 2
PHP Code:
function onCreated(){
  
this.level.obj2 this;
}

function 
onPlayerTouchsMe(){
  
this.level.obj1.wasTouched();
}

public function 
wasTouched(){
  
this.hide();

Reply With Quote