Thread: Npc to Npc
View Single Post
  #2  
Old 02-03-2011, 03:47 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
PHP Code:
//Set a reference for the NPC
function onCreated(){
  
this.level.somename this;
}

function 
onPlayerTouchsMe(){
  
//this.level.someothername being the reference for the opposite NPC
  
this.level.someothername.wasTouched();
}

public function 
wasTouched(){
  
//stuff

Just have to make 2 npcs with this script and make sure to set the necessary variable names.

CallNPC is really a relic from pre npcserver/pre GS2 days, may still work Clientside but it's somewhat deprecated.
Reply With Quote