Thread: putbomy
View Single Post
  #2  
Old 07-20-2005, 06:31 PM
ChibiChibiLuc ChibiChibiLuc is offline
Cookie Monster. :3
Join Date: Jan 2005
Location: Nova Scotia, Canada
Posts: 111
ChibiChibiLuc is on a distinguished road
Send a message via AIM to ChibiChibiLuc Send a message via MSN to ChibiChibiLuc
First, create a player functions class.

Then join it to the player. In the Control-NPC:
NPC Code:
player.join("playerfunctions");



In the class, put:
NPC Code:
public function PutBomy(putx,puty) {
dostuff();
}



Now, to call PutBomy, send a trigger to the server:
NPC Code:
triggeraction(0,0,"serverside",#N,params);



When it catches the action, call PutBomy:
NPC Code:
function onActionServerside() {
PutBomy(player.x,player.y);
}


This will trigger 'PutBomy' in the class.

Last edited by ChibiChibiLuc; 07-20-2005 at 07:26 PM..
Reply With Quote