PDA

View Full Version : gani problem >_<


Chompy
04-05-2007, 10:53 PM
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

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


gani script

SCRIPT
function onPlayerEnters()
setTimer(0.05);
function onTimeout()
{
with(findimg(2)) {
text = player.attr[6].tokenize(",")[0];
x = player.x + 1.5;
y = player.y + 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] @ "]";
x = player.x + 1.5;
y = player.y + 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.

text = player.attr[6].tokenize(",")[0];

Shouldn't this be

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
Please, correct me if I am to be wrong.

text = player.attr[6].tokenize(",")[0];

Shouldn't this be

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/showthread.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..