I have run into an issue that I am not entirely sure how to resolve. I currently am using a gani to display an image above the players' head of that players' specific choosing. I am displaying the gani through a player attribute. This is my gani script:
PHP Code:
SCRIPT
//#CLIENTSIDE
function onCreated() {
onPlayerEnters();
}
function onPlayerEnters() {
with ( findImg( 2 ) ) {
image = clientr.player_icon;
x = player.x;
y = player.y;
attachToOwner = true;
attachOffset = "1.1,-1.3,0";
mode = 1;
}
}
SCRIPTEND
The problem I seem to run into now is that clientr.player_icon is not by any means attaching to the specific player that the gani is stored to in that player's attributes. Instead, it will display my clientr.player_icon image. How do I store the image differently, or at least reference the other player's clientr.player_icon so it shows theirs on my screen and mine on theirs? I would like to keep the display of the image inside the gani if possible.
I understand this is a tad confusing in the wording, so essentially what is happening is if I am player a, and player b is another player, and we both have different clientr.player_icon images, player a will see his icon image on his screen, and player b's icon will also display player a's clientr.player_icon, even when they are different and vice versa. Any help is appreciated.
I also know that the index of the image is always the same, which could be an issue, but I wouldn't think that it would matter if it is stored in a gani and displayed through a player attribute... Though I could be wrong. I have the script clientside in the gani, so I'm not so sure that would make a difference anyways.