View Single Post
  #1  
Old 08-15-2010, 08:38 AM
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
Request: Variable Tweening

This is something I think could really improve some things on Graal. Most likely one of the most useful things that could be added to GScript2: tweening.

Right now Stefan has added createAnimation() to v6, but I really think it would be much more effective to add tweening instead.

Example of how it would work.

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
with (findimg(200)) {
    
this.image "door.png";
    
this.layer 3;
    
this.30;
    
this.30;
    
this.tween("alpha"0.501);
  }

The door would fade in, taking alpha from 0 to 1 in 0.5 seconds.

More interesting things like player tweening could be usable too.

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
player.tween("x"10player.xplayer.10);

This could move the player to the right by 10 tiles over 10 seconds.

Tweening should also be usable on GuiControl objects, for tweening a window's alpha or other variables.


Thoughts, ideas? Any more to add?
I would really like to see this added in v6. It is similar to createAnimation() but much more powerful and flexible.
__________________


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