Hi!
here is the code for character click form the global script:
[code]
function WalkToCharacterEx(int charidwhogoes, int charidtogo, int direction, int xoffset, int yoffset, int NPCfacesplayer, int blocking){
//Goes to a character staying at the side defined by 'direction': 1 up, 2 right, 3 down, 4 left
//and it stays at xoffset or yofsset from the character. NPCfacesplayer self-explained.

// blocking: 0=non-blocking; 1=blocking; 2=semi-blocking.
// returns 1 if player arrived.
int playerchar,charidx,charidy,playerx,playery;
if (charidwhogoes!=GetPlayerCharacter() && blocking==2) blocking=0;//npcs cant perform semi-blocking actions
playerchar=charidwhogoes;
charidx=character[charidtogo].x;
charidy=character[charidtogo].y;
playerx=character[playerchar].x;
playery=character[playerchar].y;
int arrived = 1;
if ((Offset (playerx, charidx) > xoffset) || (Offset (playery, charidy) > yoffset)){
if (direction==0){ // shortest way.
if (Offset(charidx,playerx)>=Offset(charidy,playery)){ // left or right
if (playerx>=charidx) direction=2; //right
else direction=4; //left
}
else{
if (playery>=charidy) direction=3; //down
else direction=1;
}
}
// calculate target position
if (direction==1) charidy-=yoffset;
else if (direction==2) charidx+=xoffset;
else if (direction==3) charidy+=yoffset;
else if (direction==4) charidx-=xoffset;
// move character
if (blocking==0){
MoveCharacter(playerchar,charidx,charidy);
arrived = 0;
}
else if (blocking==1){
MoveCharacterBlocking(playerchar,charidx,charidy,0);
arrived = 1;
}
else if (blocking==2) arrived = MovePlayer(charidx,charidy);
}
if (arrived > 0){
// characters only face each other after the moving character arrived at the target point
if (NPCfacesplayer==1) FaceCharacter(charidtogo, playerchar);
FaceCharacter(playerchar, charidtogo);
}
return arrived;
}
function GoToCharacter(int charid, int direction, int NPCfacesplayer, int blocking){
//same as above but with default x and y offset.
int defaultxoffset, defaultyoffset;
defaultxoffset=25;
defaultyoffset=15;
return WalkToCharacterEx(GetPlayerCharacter(),charid,direction,defaultxoffset,defaultyoffset,NPCfacesplayer,blocking);
}
[/code]
The thing is I really don't want to change it since it's only a problem for one character.