is there a way to reversing continuous scaling, so that instead of making sprites go from small to big when moving down the screen, they go from big to small?
when I try to enter the numbers in the continuous scaling box, they just reset themself if I enter a reversed value..
Not natively, so you have to script it. Try this:
Make a view with vertically flipped frames of the player character's view and enter it in the walkable area's "Change player view while on this area", then
// room script
#define WALKAREA_ID 2 // number of the walkable area
#define WALKAREA_TOP_EDGE 202 // adjust these to the dimensions of your walkable area
#define WALKAREA_BOTTOM_EDGE 329
#define WALKAREA_SCALING_TOP 100
#define WALKAREA_SCALING_BOTTOM 50
function repeatedly_execute_always() {
//...
if (GetWalkableAreaAt(player.x - GetViewportX(), player.y - GetViewportY()) == WALKAREA_ID) {
int scaling = WALKAREA_SCALING_BOTTOM + (((WALKAREA_BOTTOM_EDGE - player.y) * (WALKAREA_SCALING_TOP - WALKAREA_SCALING_BOTTOM)) / (WALKAREA_BOTTOM_EDGE - WALKAREA_TOP_EDGE));
SetAreaScaling(WALKAREA_ID, scaling, scaling);
int spriteslot = GetGameParameter(GP_FRAMEIMAGE, player.View, player.Loop, player.Frame);
player.z = -((GetGameParameter(GP_SPRITEHEIGHT, spriteslot, 0, 0) * scaling) / 100);
}
else player.z = 0;
//...
}
This code only works on the player character.
Just out of curiosity, how come you need the sprites to be smaller as they go down?
Walking on ceiling perhaps?
I've taken the code from an earlier reply of mine regarding that very problem:
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=20494
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=20553 (the follow-up)
thanks a lot guys..
and its for a sequense with a spaceship, flying from the top of the screen to the middle, moving away from the camera..
Wouldn't you just do
100 to 45
instead of 45 to 100????
no, the game automaticly resets the numbers from 100-45 to 45-100 if you do it, for some strange reason..
Strange. Strazer, do one of your tracker additions :D
Quote from: The AGS Bug Tracker* allow continuous scaling in 4 directions (down, up, left, right) to scale
the appropriate way
Would this be it?
http://adventuregamestudio.co.uk/tracker.php?action=detail&id=59
[EDIT:]BTW Elliott, the mods don't generally take too lightly people just telling them what to do...perhaps asking instead of demanding. But then it's not my place to reprimand you on your conduct.
Sorry, it was just a joke tho.
It's all good...but...you like to joke. A lot. :=
And you have a problem with that? :D
Quote from: monkey_05_06 on Thu 27/10/2005 22:06:05Would this be it?
http://adventuregamestudio.co.uk/tracker.php?action=detail&id=59
Yes, I really should have included reverse scaling in the entry's title. Nice find.
Well, IMO it would make more sense as a separate (although connected) entry.
Just a thought, but you might be able to get around the scripting by using FlipScreen() ?
That's a buggy feature, and it'd be really hard to make it work right.
Yes, I only suggested it as an alternative method, I didn't mean to recommend it.
Anyway after a bit more thinking, just make the spaceship sprite with a lot of empty space below the ship and have it walk normally into the distance, this should give the effect of it descending provided there is enough space to make it appear above the screen, so to speak.
Better would be to use a character with the normal spaceship graphic z value large enough to make it appear above the horizon.
[EDIT] Oh oh z values doesn't get scaled, anyway this works, using character with space below picture,
Download (http://www.alpha72.com/CRS/CRS.rar)
Ingenious! Perfect, simple solution for this particular problem.
yeah that was a good solution, but I dont think itll work for me, my spaceship comes in from NE corner of the screen, then flies away out of the screen in the middleleft, and that method doesnt work here since the ship is moving downwards.. but still, it is a good method and Ill probably use it in the future, thanx :)
Don't see your problem, the ship can move anywhere, just use the walk button after cutscene.