Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-09-2009, 04:56 AM
Rave_J Rave_J is offline
Graal Developer
Join Date: Feb 2006
Location: Texas
Posts: 848
Rave_J can only hope to improve
Send a message via AIM to Rave_J Send a message via MSN to Rave_J Send a message via Yahoo to Rave_J
quick question

ok i seen this a lot and want to know what you guys think since im new to the scripting ect.

Ok the GUI Editor
i seen it a lot pretty basic to use
but cant you use particles and gani's to display on the gui ?
but lack of quality graphics

then i see Showimg()
a lot too with more quality graphics ect basically displays as a img not a bitmap boarder

so my question is what will give you less lag and give you good quality graphics to do is it better to use showimg or gui editor.

i also while i put in a bitmap using current era bitmap as a example the text on the button is slightly off where u can only read half of it how would i fix this problem ?
Reply With Quote
  #2  
Old 09-09-2009, 05:08 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
First, you should avoid the GUI editor like the plague. It is much easier and neater to hand-code GUIs.

Second, it depends what you want to use it for whether you should use GUIs or showimgs.

And third, can you show the code you're using to set the bitmap?
__________________
Reply With Quote
  #3  
Old 09-09-2009, 06:48 AM
Rave_J Rave_J is offline
Graal Developer
Join Date: Feb 2006
Location: Texas
Posts: 848
Rave_J can only hope to improve
Send a message via AIM to Rave_J Send a message via MSN to Rave_J Send a message via Yahoo to Rave_J
ya sorry here it is "umm the gui editor is really not that messy well i guess if you didn't make it
PHP Code:
New GuiWindowCtrl("MyGUI_Window1") {
    
profile GuiBlueWindowProfile;
    
clientrelative true;
    
clientextent "320,240";
    
profile.bitmap "guiera_window.png"
    
visible=0;
    
canclose false;
    
canmaximize false;
    
canminimize false;
    
canmove true;
    
canresize true;
    
closequery false;
    
destroyonhide false;
    
text "Baddy Quest";
    
580;
    
208;

    new 
GuiButtonCtrl("MyGUI_Button1") {
      
useownprofile true;
      
text "Accept";
      
width 80;
      
26;
      
186;
      
profile.bitmap "guiera_button.png";
    } 
Reply With Quote
  #4  
Old 09-09-2009, 12:56 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
PHP Code:
function showGui() {
  new 
GuiWindowCtrl("QuestControl_Window") {
    
profile GuiBlueWindowProfile;
    
    
clientrelative true;
    
clientwidth 320;
    
clientheight 240;
    
    
visible canClose canMaximize canResize canMinimize false;
    
    
text "Baddy Quest";
    
    
580;
    
208;
    
    new 
GuiButtonCtrl("QuestControl_Accept") {
      
profile "GuiEraButtonProfile";
      
      
width 80;
      
height 25;
      
      
26;
      
186;
    }
  }

Doesn't that look nicer?

Keep in mind that visible is a boolean, so you should not set it to '0'; instead use 'false'. "new" should also not be capitalized.

You would also do well to read this to avoid conflict later on.

As far as the profile, chances are there are some text offset things set in the profile. You can see more about that here.
__________________
Reply With Quote
  #5  
Old 09-09-2009, 02:15 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by cbk1994 View Post
PHP Code:

Doesn't that look nicer?
Personal Preference (: (How you 'categorize' variables into groups is personal preference )

Quote:
Originally Posted by cbk1994 View Post
Keep in mind that visible is a boolean, so you should not set it to '0'; instead use 'false'. "new" should also not be capitalized.
True bools do not exactly 'exist' in graal, as it's either 0 or 1. So it doesn't matter if you use true or false as the engine will read it as 0 or 1 anyways.

Reason why you can do
PHP Code:
if ((true true) == 2) {
  
// proceed

So it's basicly just easier to write 0 and 1 instead of true and false, since it's shorter
__________________
Reply With Quote
  #6  
Old 09-09-2009, 03:10 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
And for those of you that have complained before that there is no sense in people using '0' for false and '1' for true (people like Ziro), in Discrete Mathematics '0' is applied to the false boolean value and '1' is applied to the true one. Hell, I think it's even in Finite Math for that matter, and any other logic-based mathematics.
Reply With Quote
  #7  
Old 09-09-2009, 03:20 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by Gambet View Post
And for those of you that have complained before that there is no sense in people using '0' for false and '1' for true (people like Ziro)
Low blows is all you can do, isn't it? I can't remember ever saying that there is no sense in using '0' for false and '1' for true, but it makes more sense using true/false in most cases.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #8  
Old 09-09-2009, 03:37 PM
Rave_J Rave_J is offline
Graal Developer
Join Date: Feb 2006
Location: Texas
Posts: 848
Rave_J can only hope to improve
Send a message via AIM to Rave_J Send a message via MSN to Rave_J Send a message via Yahoo to Rave_J
See that's that i thought chompy
i was taught 0 is close AND 1 is open instead of using windowname.destroy ()
visible=0 in the gui script and on buttonOnActicon {
put visible=1 to close it they said it helps your computer run it better then destory
Reply With Quote
  #9  
Old 09-09-2009, 03:45 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by xXziroXx View Post
Low blows is all you can do, isn't it? I can't remember ever saying that there is no sense in using '0' for false and '1' for true, but it makes more sense using true/false in most cases.
Not intended as a low blow, just giving an example so it doesn't seem like I'm mouthing off randomly, but I can see where you would take offense. It's just rather annoying when people say that '1' and '0' shouldn't refer to true and false when they're simply showing that they have no clear sense of logical mathematics.
Reply With Quote
  #10  
Old 09-09-2009, 10:25 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Chompy View Post
Personal Preference (: (How you 'categorize' variables into groups is personal preference )

Quote:
True bools do not exactly 'exist' in graal, as it's either 0 or 1. So it doesn't matter if you use true or false as the engine will read it as 0 or 1 anyways.
Are you seriously going to reply with something that useless?

Of course booleans do not "exist" in Graal, but should be really be encouraging new scripters to use '0' and '1'?
__________________
Reply With Quote
  #11  
Old 09-09-2009, 10:38 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by cbk1994 View Post
Of course booleans do not "exist" in Graal, but should be really be encouraging new scripters to use '0' and '1'?
I always use true/false simply because it's easier to understand when quickly skimming through code but there isn't much of a difference otherwise.

Last edited by Gambet; 09-09-2009 at 10:49 PM.. Reason: Too much information
Reply With Quote
  #12  
Old 09-10-2009, 12:34 AM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
Depending on the dynamic typing system in place, 1 and 0 (stored as integers) can easily mean different things than true and false (stored as bits).

(true + true) is only possible because it dynamically changes true to 1 when you try to perform a numerical operation (addition).

It's generally good to stick to the construct utilized for a specific purpose because of the optimizations that come along with it; and even if there aren't currently optimizations, it'll suck if the optimizer gets updated and having to edit all your scripts around to get the new optimizations.
Reply With Quote
  #13  
Old 09-10-2009, 02:22 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by cbk1994 View Post
Are you seriously going to reply with something that useless?
Quote:
Originally Posted by Rave_J View Post
See that's that i thought chompy
So it's useless? Nothing is useless, it just depends on how you use it. It might of been useless for you, but for others, maybe not. So don't call my posts/replies useless unless it's spam, thank you.
__________________
Reply With Quote
  #14  
Old 09-10-2009, 05:09 PM
Rave_J Rave_J is offline
Graal Developer
Join Date: Feb 2006
Location: Texas
Posts: 848
Rave_J can only hope to improve
Send a message via AIM to Rave_J Send a message via MSN to Rave_J Send a message via Yahoo to Rave_J
?? i never said it was useless i just said i got taught by using 0 and 1 instead of true and false
Reply With Quote
  #15  
Old 09-10-2009, 05:44 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by Rave_J View Post
?? i never said it was useless i just said i got taught by using 0 and 1 instead of true and false
I know, but Chris did.
__________________

Last edited by pooper200000; 09-10-2009 at 06:38 PM.. Reason: Removed reply to deleted post.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:29 AM.


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