Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: burakaxx on Thu 18/11/2004 09:22:06

Title: Area scaling problem
Post by: burakaxx on Thu 18/11/2004 09:22:06


  in some room i want to make main character will use the my scaling adjustments for room but for some other character in same room , i want this character use other scaling percents  for example

in room

EGO will use %100 for some walkable area
but EMI will use %110 or something differnt  is there any command to do this???
Title: Re: Area scaling problem
Post by: Radiant on Thu 18/11/2004 09:37:51
Go to the character panel for EGO, and click 'ignore area scaling'
Title: Re: Area scaling problem
Post by: burakaxx on Thu 18/11/2004 14:16:35
no i think i cant explain

i want  ,at this time make the EMI character's area scaling value %110  but at the same walable area EGO character will use original values of zoom level for character scaling that i adjust in the room editor

i hope i can explain this time

anyway thankyou
Title: Re: Area scaling problem
Post by: BorisZ on Thu 18/11/2004 14:44:37
Maybe the easiest way to do this would be to make new view 10% bigger than the original and change it on room load.
Title: Re: Area scaling problem
Post by: burakaxx on Thu 18/11/2004 15:04:47

you mean drawing %10 bigger in my paint program??

or is thatt some command in ags makes character's views bigger %10 

because in my paint program when i try to resize views  views going smoother and distorted....

Title: Re: Area scaling problem
Post by: BorisZ on Fri 19/11/2004 12:33:18
Be sure that ratio of width and height is same when you resize it.
You can't resize your sprite image in AGS, you'll have to do it in another program.
Title: Re: Area scaling problem
Post by: Barbarian on Wed 02/11/2005 07:02:37
Sorry to be posting to such an old thread, but, I had a similar problem, and I think I now have a decent workaround for this figured out now (my little coding solution should work with the AGS version 2.71+ I believe).

Anyways, I have a few hundered character sprites so far for a project I'm currently working on.Ã,  After all of that hard work, when I put two of the main characters in the game side by side in game, it appears that one of them looks just a slightly bit larger than I wanted it in comparison to the other character sprites.

So, I could have opened up my graphic editor programs once again and resized a couple hundred sprites, but, I figured there must be some easier way to just slightly readjust the scaling size of one character in game via coding, rather then spending many long hours again to resize all those sprites one by one... quite a tedius and time consuming task I might add.

So, here's what I came up with, for my game, the character I wanted to rescale would be just perhaps a little bit smaller than the rooms walkable x & y scalable areas.

In the character's properties I wanted to appear just a little smaller (for my game, the character's name is "Jane"), I check to "Ignore room area scaling", this could also be set by adding to the game_start of the global script by adding cJane.ManualScaling = true;

Then, for each room that I wanted "Jane" to appear a little smaller than the set scaling area properties, before the room's fadin I would add in a script of code to say cJane.Scaling = (GetScalingAt(cJane.x, cJane.y) -5 ); the "-5" at the end of that line could be adjusted according to the scaling adjustment required for that character, so it could be "-20" or "+15" or whatever you like to set it at. Of course "cJane" would be changed to whatever character name you wanted to change, so could be "cBob" or "cJohn", well you get the idea.
Ã,  Ã, So, I add this into the Before Fadein part, otherwise, the previous scaling size of the character from the previous room that character was in would be remembered, and the chracter would maybe appear too big or too small for an instant before the next part of the code had a chance to execute.

So, for that room's Repeatedly Execute options, I also add in script option of: cJane.Scaling = (GetScalingAt(cJane.x, cJane.y) -5 ); to keep updating the character's scaling size according to the rooms walking area scaling properties that the character is standing or walking on.

Anyways, it seems to work great for me, and I thought it might be of help to some other people with similar problems, as I noticed when I was searching the forums here that several other people had similar questions and problem that I was having, and not wanting to manually re-edit/re-size hundreds of sprites all over again.Ã,  Ã, :)