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 05-22-2012, 07:34 PM
blackbeltben blackbeltben is offline
Registered User
Join Date: Aug 2011
Posts: 83
blackbeltben is on a distinguished road
Alternate Img Display?

I actually have two questions. I'll split them up!

Question 1
Is there any other way to show/draw images besides showImg()?
When I draw an image, my players can see it, but others can't.
(and the image index is less than 200)
Just need to know if there are any other ways to display images with the player.

Question 2
How would I go about changing a number of a head in a custom body system.
Just making a way to scroll through the different heads.

onKeyPressed(code, key)
{
if (key = "u")
{
player.attr[x] = servername_head_1.png <-- I want the '1' to go up to
'2'. '2' to '3'...and so on
every time you press "u"
Reply With Quote
  #2  
Old 05-22-2012, 08:41 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Quote:
Originally Posted by blackbeltben View Post
Question 1
Is there any other way to show/draw images besides showImg()?
When I draw an image, my players can see it, but others can't.
(and the image index is less than 200)
Just need to know if there are any other ways to display images with the player.
Are you sure the file is uploaded? You could do something like:
PHP Code:
//#CLIENTSIDE
function onPlayerChats() {
  if (
player.chat == "/image") {
    
with (findimg(100)) {
      
image "block.png";
      
player.x;
      
player.y;
    }
  }

Quote:
Originally Posted by blackbeltben View Post
Question 2
How would I go about changing a number of a head in a custom body system.
Just making a way to scroll through the different heads.

onKeyPressed(code, key)
{
if (key = "u")
{
player.attr[x] = servername_head_1.png <-- I want the '1' to go up to
'2'. '2' to '3'...and so on
every time you press "u"
Try something like
PHP Code:
//#CLIENTSIDE
function onKeyPressed(codekey) {
  if (
key == "u") {
    
temp.pressedcount ++;
    
player.attr[1] = "hat" temp.pressedcount ".png";
  }

__________________
MEEP!
Reply With Quote
  #3  
Old 05-22-2012, 09:25 PM
blackbeltben blackbeltben is offline
Registered User
Join Date: Aug 2011
Posts: 83
blackbeltben is on a distinguished road
Quote:
Are you sure the file is uploaded? You could do something like:
The File IS uploaded. I am not sure why people can not see each other's images :/
Reply With Quote
  #4  
Old 05-22-2012, 09:27 PM
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 blackbeltben View Post
The File IS uploaded. I am not sure why people can not see each other's images :/
Images with indexes below 200 only show to all players if they're small. I don't recall the exact size.
__________________
Reply With Quote
  #5  
Old 05-22-2012, 09:33 PM
Hezzy002 Hezzy002 is offline
Registered User
Join Date: Jul 2011
Posts: 247
Hezzy002 is a jewel in the roughHezzy002 is a jewel in the rough
I've never trusted this mechanic of Graal for a variety of reasons including huge waste of bandwidth and unreliable behavior. You should look into alternatives or writing your own system.
Reply With Quote
  #6  
Old 05-22-2012, 10:04 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Quote:
Originally Posted by cbk1994 View Post
Images with indexes below 200 only show to all players if they're small. I don't recall the exact size.
I've tried displaying an image with index 100 with a zoom size of 2 before and it just cuts off.
Reply With Quote
  #7  
Old 05-22-2012, 10:09 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
A weapon needs to display a showimg with index between 1-200 and the size must be less or equal to 128x128 pixels. Alternatively you can also use ganis as player.attr[], although showimg should be fine as long as you don't want to display a lot.
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 01:03 AM.


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