Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   gani problem >_< (https://forums.graalonline.com/forums/showthread.php?t=73308)

Chompy 04-05-2007 10:53 PM

gani problem >_<
 
Well, once again I have a gani problem...!

I'm using Ziro's method as he explained in his other thread...
But I don't know if I am doing it wrong or it's something wrong with the script(s)



I'm using this to attach the gani, in an onPlayerEnters() event
PHP Code:

player.attr[5] = "chompy_interface.gani";
player.attr[6] = @{player.nickclientr.mud.stats_level}; 

gani script
PHP Code:

SCRIPT
function onPlayerEnters()
  
setTimer(0.05);
function 
onTimeout()
{
  
with(findimg(2)) {
    
text player.attr[6].tokenize(",")[0];
    
player.1.5;
    
player.3.5;
    
zoom 0.8;
    
style "bc";
    
red 1;
    
green 1;
    
blue 1;
    
alpha 0.99;
    
layer 0;
  }
  
with(findimg(3)) {
    
text "[Level" SPC player.attr[6].tokenize()[1] @ "]";
    
player.1.5;
    
player.4.5;
    
zoom 0.65;
    
style "bc";
    
red 0;
    
green 0.88;
    
blue 0;
    
alpha 0.99;
    
layer 0;
  }
setTimer(0.05);
}
SCRIPTEND 

The problem is, let's say there are 5 players in a level, as myself, number 1,
I can see 1, 2 and 3 for example, BUT not 4 and 5..
But, 4 and 5 can see everyones (1, 2, 3, 4, and 5)..

Quite annoying..

Anyone (or Ziro) could help me with this?

Chandler 04-06-2007 07:51 AM

Please, correct me if I am to be wrong.
HTML Code:

text = player.attr[6].tokenize(",")[0];
Shouldn't this be
HTML Code:

text = player.attr[6][0];
However, you're finding that image over and over again.
Maybe use "attachtoowner" with a particle, which could give the same effect. You could also update it when necessary?
I don't know why you you can only see certain ones, maybe it's something calling this weapon? Make sure everyone is to receive the "trigger".

DrakilorP2P 04-06-2007 10:27 AM

Quote:

Originally Posted by Chandler (Post 1297365)
Please, correct me if I am to be wrong.
HTML Code:

text = player.attr[6].tokenize(",")[0];
Shouldn't this be
HTML Code:

text = player.attr[6][0];
However, you're finding that image over and over again.
Maybe use "attachtoowner" with a particle, which could give the same effect. You could also update it when necessary?
I don't know why you you can only see certain ones, maybe it's something calling this weapon? Make sure everyone is to receive the "trigger".

Check this for the tokenize() matter; http://forums.graalonline.com/forums...ad.php?t=72413

Chompy 04-06-2007 03:28 PM

Yeah, I was using Ziro's method, but I used tokenize(",") because the first member was the name/nick, and the name will probably contain spaces, but I gotta fix that later because names will have comma's too..

Well, I'll try the particle method Chandler :p

And, the player.attr[6] is updated each time the player changes his name or levelups..


All times are GMT +2. The time now is 12:25 AM.

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