Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: HarmHero on Mon 12/12/2022 13:46:43

Title: Scaling flying bird, making it smaller
Post by: HarmHero on Mon 12/12/2022 13:46:43
Hi there! First post. I'm a 46 year old point-and-click fan, already from the 1980s with Sierra, and LucasArts. Now, I'm playing a bit with AGS to see if I can make my own game. It will take a while though :)

Anyway, I have this script with an animated object of a flying bird:

Code (ags) Select
function room_FirstLoad()
{
cBird.SetView(2);
cBird.Move(325, 20, -1, eNoBlock, eAnywhere);
cBird.Animate(0, 5, eRepeat, eNoBlock, eForwards);
}

Works great! But now I want to make the bird appear smaller as it's flying towards the horizon. Is that possible?

Many thanks in advance!

Title: Re: Scaling flying bird, making it smaller
Post by: eri0o on Mon 12/12/2022 14:09:48
Scaling for Characters can be done mainly in two ways, by using manual scaling or by using a walkable area which has a specific scaling set (or a range).

Manual Scaling means using the cBird.Scaling directly after setting cBird.ManualScaling. This would mean you have to handle the scaling.

https://adventuregamestudio.github.io/ags-manual/Character.html#characterscaling

Depending on how the room actually is, graphically and where the bird passes, it may be possible to use the walkable area alternative.

A third option is to use the Tween module and then Tween the character scaling at the same time.
Title: Re: Scaling flying bird, making it smaller
Post by: Snarky on Mon 12/12/2022 14:37:56
Quote from: eri0o on Mon 12/12/2022 14:09:48A third option is to use the Tween module and then Tween the character scaling at the same time.

And in practice, this will almost certainly be the easiest and best solution.