Tween
by Marcio Shimoda · in General Game Discussion · 10/03/2003 (6:10 am) · 3 replies
How do I create a tween animation? For example, change the size when the mouse pointer is over a button?
#2
Speak for the next RE SDK, can yah give us some info of whats new/changed?
-Ron
10/04/2003 (10:34 am)
Hey Chris!Speak for the next RE SDK, can yah give us some info of whats new/changed?
-Ron
#3
button enter =
{
frame 1 = { ... }
frame 2 = {
keyframe = {
actor = bmpEnterR; size = 2, 2;
}
}
frame 3 = { ... }
}
movie Example
{
frame 1 "start" =
{
keyframe Enter =
{
layer = 7;
actor = enter;
position = 243,370;
tween = { size = true; }
onMouseUp = {...}
...
}
}
}
10/06/2003 (8:09 am)
Something like this?button enter =
{
frame 1 = { ... }
frame 2 = {
keyframe = {
actor = bmpEnterR; size = 2, 2;
}
}
frame 3 = { ... }
}
movie Example
{
frame 1 "start" =
{
keyframe Enter =
{
layer = 7;
actor = enter;
position = 243,370;
tween = { size = true; }
onMouseUp = {...}
...
}
}
}
Torque Owner Chris Cole
In G2D you might want to use a movie script to handle this, use the scale= to setting the size of the actor.
In G3D you'll need to define the tween in the modeler and give it a sequence name, then you can invoke the sequence through application logic.
BTW in the next version of the RE SDK, I've added direct scaling to the G3D_Part class, so sizing along any of its axes becomes automatic. This version will be released as soon as the cross platform support is wrapped up.
Hope this helps
Chris