Thread: mouse coords
View Single Post
  #22  
Old 02-10-2005, 02:02 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Quote:
Originally Posted by falco10291029
Is there any way to convert a clientside id to a serverside one?
Well there are different solutions:

1. You trigger on the position of the npc you want to move, then the npc directly gets the trigger and you don't need to code anything complicated (triggeraction monsterx,monstery,test,...; -> if (actiontest) ...)

2. You send the ID of the npc (not the index), and on the serverside you are searching for the npc with the right id - this works because the ID is actually the same, except when the npc is not existing on the serverside, e.g. if it only has clientside script
for (i=0; i<npcscount; i++) if (npcs[i].id==monsterid) callnpc i,test,...;
Reply With Quote