Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   showimg2 (https://forums.graalonline.com/forums/showthread.php?t=37733)

Loriel 09-10-2002 10:12 PM

showimg2
 
The showimg2 command allows NPCs to display an image in "3d space", using an x, y and z coordinate. But there is a big flaw with it - the Z coordinate is not sent to other players (at least when used in weapons).
To test it:
//#CLIENTSIDE
if (playerchats && strequals(#c,show bug)) {
showimg 0,@X,30,30;
showimg2 0,@X,30,30,5;
}
You will see 2 Xs: one on 30/30, and one above it.
But every other player will only see one, because they are displayed on the same position.

emortylone 09-11-2002 11:20 PM

That ish bad =/ But you should use two different indexes, perhaps that is where your problem lies?
---Shifter

Loriel 09-11-2002 11:42 PM

Eek, of course I used two different indexes. Just not when "scripting" that little example. :(

Psycho_Goldfish42 10-04-2002 12:57 AM

showimg2
 
The problem could always be that "showimg2" doesn't work the same as "showimg", as do you know if anything below 200 is a thing everyone can see, or is that a command difference? Maybe a programming problem caused above 200 to be everyone-visible? I don't know, but experiment with the Z position aswell as image IDs.

R0b1n-NPC 10-05-2002 09:16 PM

How did they do it on 2k2 then? i can see other peoples footsteps

Loriel 10-05-2002 11:22 PM

Psycho_Goldfish42: If I use showimg2 two times, it is always displayed to other players. Just the Z-thing does not work.
Robin: As far as I know, every client showimgs those footsteps locally. showimg2 does not work on gmaps at all...

R0b1n-NPC 10-06-2002 04:06 AM

Works fine for me:

NPC Code:

NPC Code:

// NPC made by R0bin
if (created||timeout) {
showcharacter;
dir=1;
sprite=25;
for (f=29;f>-1;f-=1) {
hideimg f;
sleep 0.05;
}
sleep 0.5;
sprite=15;
shootlight();
timeout=0.5;
}
function shootlight() {
for (f=0;f<30;f+=1) {
this.x=x-f;
this.y=y+2.5;
this.z=getz(this.x,this.y);
showimg2 f,light4.png,this.x-4,this.y-4,this.z;
changeimgzoom f,0.75;
changeimgcolors f,1,1,1,0.99;
sleep 0.05;
}
}




CheeToS2 10-06-2002 05:53 AM

Quote:

Originally posted by R0b1n-NPC
Works fine for me:

NPC Code:

NPC Code:

// NPC made by R0bin
if (created||timeout) {
showcharacter;
dir=1;
sprite=25;
for (f=29;f>-1;f-=1) {
hideimg f;
sleep 0.05;
}
sleep 0.5;
sprite=15;
shootlight();
timeout=0.5;
}
function shootlight() {
for (f=0;f<30;f+=1) {
this.x=x-f;
this.y=y+2.5;
this.z=getz(this.x,this.y);
showimg2 f,light4.png,this.x-4,this.y-4,this.z;


NPC Code:
NPC Code:
showimg f+30,light4.png,this.x-4,this.y-4;
changeimgzoom f,0.75;
changeimgcolors f,1,1,1,0.99;
sleep 0.05;
}
}




Your script isn't proving anything if you're only using showimg2. Loriel means if you use showimg2, other players see the z value as 0, instead of whatever you set it at.

R0b1n-NPC 10-06-2002 08:10 AM

Well its proof that showimg2 works on gmaps isnt it?

Loriel 10-06-2002 08:45 AM

I wasn't clear enough x.x
Stefan and me run around on a gmap and did not see each other's showimg. So I mean, those are not sent to other players on gmaps at all, not just missing the z information.

Com013 10-06-2002 09:18 PM

Re: showimg2
 
Quote:

Originally posted by Loriel
But every other player will only see one, because they are displayed on the same position.
Are you sure they are displayed on the same position? Maybe it is just one image. The showimg2 image was maybe not displayed at all.

Loriel 10-06-2002 10:29 PM

I start to realize I used a very bad example. :(
Yes, Com, I am sure it is showimg both images.

user13-xo 10-22-2002 03:01 PM

Quote:

Originally posted by Loriel
I wasn't clear enough x.x
Stefan and me run around on a gmap and did not see each other's showimg. So I mean, those are not sent to other players on gmaps at all, not just missing the z information.

I noticed this about um i think 2 months ago :(


All times are GMT +2. The time now is 05:15 AM.

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