Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-29-2010, 06:31 AM
Mark Sir Link Mark Sir Link is offline
Kevin Azite
Mark Sir Link's Avatar
Join Date: Sep 2005
Posts: 1,489
Mark Sir Link is just really niceMark Sir Link is just really nice
Send a message via AIM to Mark Sir Link
GUI Profile Help

In a class NPC, I am defining a few GUIProfiles. However, SweetTabProfile and SweetScrollProfile fail to load (the rest load fine).

However, if I update a weapon that is joining the class, SweetTabProfile and SweetScrollProfile will then start to load properly.

Any idea what's up?


Graal Script Code:
Profile Class

//#CLIENTSIDE
function onCreated(){
  new 
GuiWindowProfile("SweetWindowProfile")
    {
    
bitmap "Kevin641800-gamerkid_black_gui_window.png";
    
fontcolor = {255,255,255,255};
  }
  new 
GuiTabProfile("SweetTabProfile"){
    
bitmap "unevent_achievements_gui_tab.png";
    
fontcolor = {255,255,255,255};
  }
  new 
GuiButtonProfile("SweetButtonProfile")
    {
    
bitmap "unevent_gamerkid_gui_btn_black.png";
    
fontcolor = {255,255,255,255};
  }
  new 
GuiTextListProfile("SweetTextListProfile"){
    
fontcolor = {255,255,255,255};
    
fillcolorhl = {175,175,175,255};
  }
  new 
GuiTextProfile("SweetTextProfile")
    {
    
fontcolor = {255,255,255,255};
  }
  new 
GuiScrollProfile("SweetScrollProfile")
    {
    
bitmap "unevent_achievements_gui_scroll.png";
  }
  new 
GuiTextEditProfile("SweetTextEditProfile")
    {
    
bitmap "unevent_gamerkid_gui_txtedit_black.png";
    
fontcolor = {255,255,255,255};
    
fillcolor = {27,27,27,255};
    
fillcolorhl = {150,150,150,255};
  }
  new 
GuiRadioProfile("SweetRadioProfile")
    {
    
bitmap "unevent_gamerkid_gui_radio_black.png";
    
fontcolorsel  = {255,255,255,255};
    
fontcolor = {225,225,225,255};
  }

Reply With Quote
  #2  
Old 07-29-2010, 06:47 AM
Mark Sir Link Mark Sir Link is offline
Kevin Azite
Mark Sir Link's Avatar
Join Date: Sep 2005
Posts: 1,489
Mark Sir Link is just really niceMark Sir Link is just really nice
Send a message via AIM to Mark Sir Link
resolved by putting the profiles into a weapon instead.
Reply With Quote
  #3  
Old 07-29-2010, 02:23 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
FYI the problem was likely that the GUI was being drawn before the profiles were loaded. You can always do something like:

Graal Script Code:
while (! profilesLoaded) {
  
sleep(0.05);

in weapons that draw profiles at the start (this forces it to wait for the profiles to load). Then when making the profiles, add this to the end of the function:

Graal Script Code:
profilesLoaded true
Otherwise, another option to make sure that the profiles are always made first is to put the GuiControlProfile-creating weapon as the first weapon in 'weaponorder' in server options.
__________________
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 03:36 AM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (C) 1998-2008 Linux cyberjoueurs All Rights Reserved.