Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Oooo custom gui's and such (https://forums.graalonline.com/forums/showthread.php?t=50892)

Gman4pwnu 02-06-2004 05:40 AM

Oooo custom gui's and such
 
I believe they use showimg ? Im just wondering, how do servers like era manage to keep their GUI on that perfect space on the screen? heh, right now im trying to make some mine rock types stay in a certain place on the time but when the player reaches the edge of the level, the rock likes to walk away. How is it done?

Riot 02-06-2004 05:49 AM

Re: Oooo custom gui's and such
 
Quote:

Originally posted by Gman4pwnu
I believe they use showimg ? Im just wondering, how do servers like era manage to keep their GUI on that perfect space on the screen? heh, right now im trying to make some mine rock types stay in a certain place on the time but when the player reaches the edge of the level, the rock likes to walk away. How is it done?
Images/text are drawn on layer 4 or greater so they draw on screen, then use screenwidth and screenheight to place them on the screen.

Duwul 02-06-2004 05:55 AM

Re: Oooo custom gui's and such
 
Quote:

Originally posted by Gman4pwnu
I believe they use showimg ? Im just wondering, how do servers like era manage to keep their GUI on that perfect space on the screen? heh, right now im trying to make some mine rock types stay in a certain place on the time but when the player reaches the edge of the level, the rock likes to walk away. How is it done?
I don't understand what you mean by "it walks away". Please elaborate. (I like using big words =P)

Gman4pwnu 02-06-2004 05:58 AM

ehehe confused, examples? examples always help.

Duwul 02-06-2004 05:59 AM

You are confusing me by just what you say. At least post an example script so I can understand what you are saying.

Gman4pwnu 02-06-2004 06:02 AM

Ok, i use a timeout = .05 and everytime theres a timeout i put a showimg at the playerx + some numbers and playery + some numbers, and like it just goes off screen at a point. I thought you did it by usin playerx and playery.

Nappa 02-06-2004 06:04 AM

STOP. WITH. THE. THREADS.


MAKE ONE THREAD WITH MULTIPLE QUESTIONS PLEASE.

Duwul 02-06-2004 06:05 AM

Oh, I see.
I believe you are going about it wrong.
When making GUIs, the images are shown at screen coordinates, rather than in-game coordinates.
An example would look like this:

NPC Code:

if (created || timeout){
showimg 201,guigfx.png,screenwidth-imgwidth(guigfx.png),0;
changeimgvis 201,4;
timeout = .05;
}



That would show "guigfx.png" at the upper right-hand corner of the screen all the time.

Gman4pwnu 02-06-2004 06:06 AM

Nappa: S T F U, ITS BEEN 2 THREADS ONLY IN A DAY, THE OTHER TIME I JUST DECIDED TO ASK A LOT OF QUESTIONS, DO NOT REPLY IF YOU DO NOT BRING HELP!

that is all.

Gman4pwnu 02-06-2004 06:07 AM

Thank you duwal, that is helpful, is there any way i can customize it so its lower down the screen? Like set the exact position of it.

Duwul 02-06-2004 06:10 AM

NPC Code:

showimg 201,guigfx.png,screenx,screeny;
changeimgvis 201,4;



Change screenx/y to adjust the positioning of the image on the screen.

Gman4pwnu 02-06-2004 06:33 AM

How can i do this with showtext?

Alexander 02-06-2004 06:41 AM

same way
NPC Code:

if (created) {
showtext 500,screenwidth/2,screenheight/2,Arial,bc,Hello;
changeimgvis 500,4;
changeimgzoom 500,5;
}


WanDaMan 02-06-2004 09:34 AM

2 Threads, calm down bud.
Looks like this has been solved:(

Python523 02-06-2004 01:50 PM

Ok seriously, MAKE. AN. EFFORT. TO. LEARN., you should not expect to get every answer handed to you.


All times are GMT +2. The time now is 12:28 PM.

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