Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-20-2006, 03:29 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Gui Timeout

Hi all

I created a gui back some time and it worked great now a few monthys later all's going fine but the player mp wont update in a guitextctrl(text1) I have text = player.mpand in a timeout I have

if (player.mp != text1.text) {
text1.text = player.mp;
}

yet this doesnt work. Does anyone not know why?
__________________
Deep into the Darkness peering...
Reply With Quote
  #2  
Old 07-20-2006, 10:37 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
The code looks ok, text1 must be bugged / not set.
Reply With Quote
  #3  
Old 07-20-2006, 12:55 PM
ForgottenLegacy ForgottenLegacy is offline
-Backtoscripts-
Join Date: Aug 2003
Location: California
Posts: 289
ForgottenLegacy is on a distinguished road
Send a message via AIM to ForgottenLegacy
Maybe use object.setText(text), and check to see the timeout is working.
__________________
"The higher you fly, the harder it is to breathe."

[Kaidenn] Maybe I will somehow take control of Lance's body when he isn't looking, have him log onto Kingdoms, update one script, and leave.
[Kaidenn] And leave him exactly where I found him, unchanged and completely unnaware of what just took place the last two minutes.
[GrowlZ] Lance: You might want to lock your bedroom door tonight
Reply With Quote
  #4  
Old 07-21-2006, 04:31 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
The timeout is working becuase it's updating other stats but the player.mp wont update :/
__________________
Deep into the Darkness peering...
Reply With Quote
  #5  
Old 07-21-2006, 01:52 PM
Omini Omini is offline
Millenium Owner
Join Date: Feb 2006
Location: N.Ireland
Posts: 293
Omini is on a distinguished road
Send a message via AIM to Omini Send a message via MSN to Omini Send a message via Yahoo to Omini
Put all the gui script in one part, but have the timeout somewhere else.

Example

PHP Code:
function onCreated()
  {
  
LoadGui();
  
onTimeout();
}

function 
LoadGui()
  {
  new 
GuiWindowCtrl("Gui_Window") {
    
destroyonhide false;
    
profile "GuiRedTransWindowProfile";
    
profile.transparency .5;
    
width 70;
    
height 60;
    
10;
    
10;
    
active true;
    
visible true;
    
canresize false;
    
canmaximize false;
    
canminimize false;
    
canmove false;
    
text "GUI";
    
    new 
GuiTextCtrl("GuiText") {
      
10;
      
23;
      
width 124;
      
height 20;
      
useownprofile true;
      
profile.fontcolor = {1,1,1};
    }
  }
}

function 
onTimeout()
  {
  
GuiText.setText("MP: "@player.mp);
  
setTimer(0.1);

__________________



Reply With Quote
  #6  
Old 07-22-2006, 05:05 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
still doesnt work :/ it updates when I update the weapon but thats it

EDIT: I got it to work thanks everyone
__________________
Deep into the Darkness peering...
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 08:44 AM.


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