Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-19-2015, 07:23 PM
devilsknite1 devilsknite1 is offline
C:
devilsknite1's Avatar
Join Date: Jul 2006
Location: Florida, USA
Posts: 269
devilsknite1 has a spectacular aura about
Send a message via AIM to devilsknite1 Send a message via MSN to devilsknite1 Send a message via Yahoo to devilsknite1
Gani Scripting and Player Referencing

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) ) {
    
image clientr.player_icon;
    
player.x;
    
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.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:20 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.