Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Make Image Stick on Screen (https://forums.graalonline.com/forums/showthread.php?t=56321)

Zickle 12-06-2004 06:42 AM

Make Image Stick on Screen
 
What would it take to make this stick on screen like

EXAMPLE:
top: 3 down
left: 1/2 of the screen

NPC Code:

showimg 38,dr-weaponsys.gif, X , Y;


Kaimetsu 12-06-2004 07:36 AM

changeimgvis

xAndrewx 12-06-2004 09:19 AM

in a timeout loop would help

Zickle 12-06-2004 03:24 PM

Thanks you two!

Dach 12-06-2004 09:00 PM

Quote:

Originally Posted by xAndrewx
in a timeout loop would help

pointless, unless you are updating the image

xAndrewx 12-06-2004 09:12 PM

try it without a timeout loop, it'll soon move after you move will it not?

Kaimetsu 12-06-2004 09:21 PM

Quote:

Originally Posted by xAndrewx
try it without a timeout loop, it'll soon move after you move will it not?

No. Changeimgvis.

ZeroTrack 12-06-2004 09:28 PM

screenheight and screenwidth will also help position it on the screen , hence custom gui's

xAndrewx 12-06-2004 09:53 PM

so I could make an image stay in the same place using changimgvis?

Kaimetsu 12-06-2004 11:04 PM

Quote:

Originally Posted by xAndrewx
so I could make an image stay in the same place using changimgvis?

Relative to a given point on the screen, yes.

Slash-P2P 12-07-2004 12:02 AM

If you want something to stick ot the screen, use changeimgvis with a layer of 4 or higher.
Try using variables such as screenwidth (how wide the graal window is in pixels) and screenheight (how tall the graal window is in pixels) if you want to make it appear 5 pixels from the bottom of the screen or something.
NPC Code:
showimg index,image,screenwidth/2,screenheight/2;


That would make the image appear centered (You can make an algorithim to make the placing more precisely centered on the screen - Thats your job, if thats what your doing.)
If its for a GUI, I suggest using an index of 200 or more.

osrs 12-07-2004 02:08 AM

Addition: Slash suggested you to use an index > 200 because it will be displayed only for you, indexes < 200 are displayed for everybody that is in the same level. (If you did not knew)

Slash-P2P 12-07-2004 03:33 AM

Quote:

Originally Posted by osrs
Addition: Slash suggested you to use an index > 200 because it will be displayed only for you, indexes < 200 are displayed for everybody that is in the same level. (If you did not knew)

Seeing everyone else's GUI would get quite annoying ;)

Zickle 12-07-2004 06:46 AM

Quote:

Originally Posted by osrs
Addition: Slash suggested you to use an index > 200 because it will be displayed only for you, indexes < 200 are displayed for everybody that is in the same level. (If you did not knew)

Thanks alot! just had that problem!


All times are GMT +2. The time now is 02:15 PM.

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