Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Problems with showimg layers. (https://forums.graalonline.com/forums/showthread.php?t=77781)

coreys 12-02-2007 12:35 AM

Problems with showimg layers.
 
Both me and my friend Pandar are having problems with showimg layers. You can only get one image to show on top of any others.
In other words, you can do
PHP Code:

showimg(201imagestuffhere);
showimg(202imagestuffhere);
findImage(202).layer++; 

But past that, you can't have any image show on top of that second one.

Angel_Light 12-02-2007 12:39 AM

findImg( 202).layer++;

cbk1994 12-02-2007 04:52 AM

showimg( 200, ... );
showimg( 201, ... );
showimg( 202, ... );
They will show on top of each other based on the order that you show them to my knowledge.

coreys 12-02-2007 06:09 AM

Logically, they should, but they don't. And damnit, Angel_Light, did I not tell you that that doesn't work. Read my post before you make a stupid reply.

Nabru 12-02-2007 06:47 AM

Out of curiosity...What difference would the spaces make in comparison to Coreys's code?

napo_p2p 12-02-2007 06:53 AM

Quote:

Originally Posted by Nabru (Post 1361731)
Out of curiosity...What difference would the spaces make in comparison to Coreys's code?

I think the difference was findimage vs. findimg.

Angel_Light 12-02-2007 07:05 AM

You used findImage. It is correctly, findImg. Sorry for correcting you apparently. o.O

Crow 12-02-2007 12:41 PM

Well, I actually only managed to show images correctly on top of each other on the GUI layers. I guess its a problem with the lack of level layers :/

cbk1994 12-02-2007 03:37 PM

findimg( 200 ).layer = 3.14;
*cough*

Would be nice if you could use decimals ... maybe you can and I don't know about it? o.o

Crow 12-02-2007 03:49 PM

We already had this discussion, and Stefan even said theres a layer between 2 and 3, but it cant be accessed via script.

cbk1994 12-02-2007 04:27 PM

Quote:

Originally Posted by Crow (Post 1361772)
We already had this discussion, and Stefan even said theres a layer between 2 and 3, but it cant be accessed via script.

What's the point of it then?

Angel_Light 12-02-2007 04:43 PM

yes you can have decimals in any layers. I've done this before. ;) and Levels do have layers btw.

Crow 12-02-2007 05:04 PM

Quote:

Originally Posted by Angel_Light (Post 1361774)
yes you can have decimals in any layers. I've done this before. ;) and Levels do have layers btw.

Does it also work like it should?

DustyPorViva 12-02-2007 05:15 PM

Level's have layers 0-3, that's it.

coreys 12-02-2007 05:29 PM

Angel, no layers can't have decimals. I'm guessing in Graal's code the variable for layer is declared as int. Sure, you can set it as a decimal, but that doesn't mean it's gonna act as a decimal value. And you didn't correct me, you just failed to read my original post where I already did that.

And yes, levels have layers, but this doesn't pertain to my problem. -.-

Angel_Light 12-02-2007 06:19 PM

Quote:

Originally Posted by coreys (Post 1361781)
Angel, no layers can't have decimals. I'm guessing in Graal's code the variable for layer is declared as int. Sure, you can set it as a decimal, but that doesn't mean it's gonna act as a decimal value. And you didn't correct me, you just failed to read my original post where I already did that.

And yes, levels have layers, but this doesn't pertain to my problem. -.-

LOOK AT WHAT YOU TYPED EXACTLY!!! You types "findImage()" that will not work. It is "findImg()" notice it is IMG not IMAGE. I've just tested this and it works.

PHP Code:

//#CLIENTSIDE
function onCreated()
{

  
showImg200"block.png"this.xthis.y);
  
showImg201,   "bar.png"this.xthis.y); 

  
findImg200).layer++;




Crow 12-02-2007 06:50 PM

PHP Code:

//#CLIENTSIDE
function onCreated() {
  
with (findimg(200)) {
    
image "block.png";
    
layer 2.5;
    
30;
  }
  
with (findimg(201)) {
    
image "pottedplant.png";
    
layer 2.3;
    
30;
  }


Result: pottedplant.png is above block.png, decimals in layers dont work.

Angel_Light 12-02-2007 08:01 PM

Hmm, odd, I thought I have done it that way. :/ Oh well, Crow is correct.

Tolnaftate2004 12-02-2007 08:42 PM

Quote:

Originally Posted by Crow (Post 1361787)
decimals in layers dont work.

They only go by half layers. I think 2.3 is being rounded to 2.5.

Angel_Light 12-02-2007 09:09 PM

Quote:

Originally Posted by Tolnaftate2004 (Post 1361805)
They only go by half layers. I think 2.3 is being rounded to 2.5.

no, I tried it :/

coreys 12-02-2007 11:36 PM

Quote:

Originally Posted by Angel_Light (Post 1361786)
LOOK AT WHAT YOU TYPED EXACTLY!!! You types "findImage()" that will not work. It is "findImg()" notice it is IMG not IMAGE. I've just tested this and it works.

It's a typo in my post, yes. But in my scripts, no. z.z


All times are GMT +2. The time now is 11:45 PM.

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