Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-19-2009, 04:08 AM
oo_jazz_oo oo_jazz_oo is offline
Jazz teh Awesome
oo_jazz_oo's Avatar
Join Date: Jul 2006
Location: California
Posts: 596
oo_jazz_oo is a jewel in the roughoo_jazz_oo is a jewel in the rough
Send a message via MSN to oo_jazz_oo
Showimg not working...

This has been bothering me...showimg is being weird with indexes under 200.

Sometimes the images show, sometimes they dont...they always show for the client, but not for other players.
Some images do work however, such as block.png and bomb.png.

Heres the script.
PHP Code:
//#CLIENTSIDE
function onCreated()
{
  
showimg(1"light4.png"player.xplayer.y);
  
  
showtext(2player.xplayer.y"Arial""c""[test]");

I can see the light on myself, but not on the other person (yes he has the weapon too). But I can see the text on him just fine.
I uploaded light4.png to the server, so I dont know what the problem is.

If I change it to say...block.png, the it shows perfectly fine.

However, I had a for() loop of 20 images showing, all of them showed for the client, and some actually showed on the other player...
So, its being really weird, and I have no clue what to do. -_-

(It was doing this on Dev mxo312, and also on N-Pulse, from what I tested)
__________________

Reply With Quote
  #2  
Old 03-19-2009, 04:30 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
There's a limit to the size of an image that can be shown on clientside to other players. This is to prevent people from displaying a tileset or another large image.

I suggest you use player.attr and a GANI script.
__________________
Reply With Quote
  #3  
Old 03-19-2009, 04:35 AM
oo_jazz_oo oo_jazz_oo is offline
Jazz teh Awesome
oo_jazz_oo's Avatar
Join Date: Jul 2006
Location: California
Posts: 596
oo_jazz_oo is a jewel in the roughoo_jazz_oo is a jewel in the rough
Send a message via MSN to oo_jazz_oo
Wow. Since when? Because, I know for a fact i've shown lights like that before...

Thanks.
__________________

Reply With Quote
  #4  
Old 03-19-2009, 04:37 AM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Quote:
Originally Posted by oo_jazz_oo View Post
Since when?
It's been that way as long as I can remember, which goes back to at least 2004. It's possible the limitation was introduced earlier, it should be mentioned in an newfeatures document.
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #5  
Old 03-19-2009, 04:38 AM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
I don't think the image size limit is the problem here. It's just most likely acting up because all the players having the showimg displaying index < 200 (which means show on all clients) probably tries to overwrite each other.

If all the players are running this weapon then I would just say use an index above 200 (with a loop on the players).
Reply With Quote
  #6  
Old 03-19-2009, 04:42 AM
oo_jazz_oo oo_jazz_oo is offline
Jazz teh Awesome
oo_jazz_oo's Avatar
Join Date: Jul 2006
Location: California
Posts: 596
oo_jazz_oo is a jewel in the roughoo_jazz_oo is a jewel in the rough
Send a message via MSN to oo_jazz_oo
Quote:
Originally Posted by WhiteDragon View Post
I don't think the image size limit is the problem here. It's just most likely acting up because all the players having the showimg displaying index < 200 (which means show on all clients) probably tries to overwrite each other.

If all the players are running this weapon then I would just say use an index above 200 (with a loop on the players).
Its only 2 players. And when I show 20 different texts with the same index, it shows for each player.
It just seems like theres a data limit for this..

I resized the image, and it will only show a certain ammount. After it reaches that ammount, it just stops showing. lol
__________________

Reply With Quote
  #7  
Old 03-19-2009, 04:52 AM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
Quote:
Originally Posted by oo_jazz_oo View Post
Its only 2 players. And when I show 20 different texts with the same index, it shows for each player.
It just seems like theres a data limit for this..

I resized the image, and it will only show a certain ammount. After it reaches that ammount, it just stops showing. lol
Well, then yes, that is the image size limit they were talking about.

You could do it like this:

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
player.attr[10] = true;
}
function 
onPlayerEnters() {
  
temp.0;
  for (
temp.players) {
    if (
player.attr[10]) {
      
showimg(200+temp.i"yourimage.png"temp.p.xtemp.p.y);
      
temp.i++;
    }
  }

Or something to that effect.
Reply With Quote
  #8  
Old 03-19-2009, 05:07 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by oo_jazz_oo View Post
Wow. Since when? Because, I know for a fact i've shown lights like that before...
I ran into the same problem on some servers before (with light2.png).
__________________
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 03:19 AM.


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