Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-05-2007, 10:53 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
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?
__________________

Last edited by Chompy; 04-05-2007 at 11:27 PM..
Reply With Quote
  #2  
Old 04-06-2007, 07:51 AM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
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".
Reply With Quote
  #3  
Old 04-06-2007, 10:27 AM
DrakilorP2P DrakilorP2P is offline
Registered User
DrakilorP2P's Avatar
Join Date: Apr 2006
Posts: 755
DrakilorP2P is just really niceDrakilorP2P is just really nice
Quote:
Originally Posted by Chandler View Post
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
Reply With Quote
  #4  
Old 04-06-2007, 03:28 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
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

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


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 11:37 PM.


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