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.x = 30;
this.y = 30;
this.tween("alpha", 0.5, 0, 1);
}
}
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", 10, player.x, player.x + 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.