View Single Post
  #12  
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