Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10  
Old 07-04-2012, 10:11 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by Alpho View Post
PHP Code:
  with (HBUI_Point0) {
    
join("plugin_tween");
    
tween("x"1xx+50);
  } 
That's called upon clicking a gui button.

HBUI_Point0 is a GuiShowImgCtrl.
Something like this should work:
PHP Code:
new GuiShowImgCtrl("HBUI_Point0") {
  
profile GuiDefaultProfile;
  
image "block.png";
  
height 32;
  
width 32;
  
300;
  
300;
  
this.join("plugin_tween");
}
...
HBUI_Point0.tween("x"1HBUI_Point0.xHBUI_Point0.50); 
The only thing is that you'll have to edit the class so that tween() is a public function so that it can be accessed by the object. Here it is:
PHP Code:
//#CLIENTSIDE
public function tween(valuetimeoldvalnewval) {
  
temp.dist newval oldval;
  
temp.step temp.dist time 0.05;
  
this.( @ value) = oldval;
  
this.trigger("TweenValue"valuetemp.stepnewval);
}

function 
onTweenValue(valuestepnewval) {
  
cancelEvents("TweenValue");
  if (
this.(@ value) == newval) return this.trigger("TweenFinished"value);
  
this.( @ value) += step;
  
scheduleEvent(0.05"TweenValue"valuestepnewval);

__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
 


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 12:29 AM.


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