Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Centered Image (https://forums.graalonline.com/forums/showthread.php?t=60470)

raiden0899 08-11-2005 10:59 AM

Centered Image
 
Im trying to put an image in the center of the player's screen but i can't figure
out how. Here's the part of my script that shows the image:
NPC Code:
showimg 597,IMAGE.gif,screenwidth/2-imagewidth(IMAGE.gif)/2,screenheight/2-imageheight(IMAGE.gif)/2;
changeimgvis 597,4;


Can someone tell me what I did wrong?

Python523 08-11-2005 12:16 PM

Try removing the imagewidth/imageheight stuff and substituting them with the true values

Chicken_l33t 08-11-2005 12:20 PM

The method I generally use is something along the lines of
this.menux = 50/100 * screenwidth
this.menuy = 50/100 * screenheight

Just change around the 25/100 etc to change possitions. It works with minimizing of the screen and mazimizing of it aswell.

-Ramirez- 08-11-2005 05:23 PM

I don't know if "imagewidth" and "imageheight" work now, but it used to be "imgwidth" and "imgheight"...

raiden0899 08-11-2005 11:05 PM

Quote:

Originally Posted by -Ramirez-
I don't know if "imagewidth" and "imageheight" work now, but it used to be "imgwidth" and "imgheight"...

that might be it. i always forget which to use. image or img.


All times are GMT +2. The time now is 09:53 PM.

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