Scale images

Started by Danman, Tue 09/03/2010 11:23:54

Previous topic - Next topic

Danman

I got an issue sorry if it has been posted before. When I import an image that is for a character it scaled up when I import it. What is wrong?? Any help will be great. The size is exact amount of pixels but is stretched when I import it.

Edit:

So This what I get


Note: This picture is not showing up on my pc so I am not sure if it is the Image host or my internet. maybe this will work
http://www.freeimagehosting.net/image.php?2670885ba9.png



barefoot

#1
Hi Danman

is the imported sprite made from scratch and just imported as a character/Object?

If I'm on the right track here then you need to make sure you choose the canvas size for the character/object...  if it appears in the game to big/small  then you'll need to resize it in your paint program. Manually set the scale if a character in the Room Script:

If character:

Code: ags

cEgo.ManualScaling = true;
cEgo.Scaling = 88;


Hope this is any help to you

barefoot

I May Not Be Perfect but I Have A Big Heart ..

Danman

#2

What I did I copied a square from the background made the Character then there what I had. Same amount of pixels in the background. See where the chairs are I copied one those chairs and drew the character to prevent this problem.

I will give that a go. But surly it should be the same scale in pixels. Is it AGS that just decided to rescale them.
But would be better is if I could just change the scale to the Same amount of pixels. Like 56x60.

I hope this makes sense. But thanks anyway barefoot actually I kinda wanted to know how to scale pictures in ags anyway like that.


Edit: I just thought I think it was the Walkable area is set to scale with character.  :-[
But thanks anyway barefoot actually I kinda wanted to know how to scale pictures in ags anyway like that.



monkey0506

As barefoot correctly identified if you want to turn off the usage of the walkable area scaling (temporarily or for just a specific character) then you can set the Character.ManualScaling property.

That way if you are using scaling in the room but don't want the character sitting at the bar to be scaled you can still use both.

Danman

OK so do I just set the character

Like
Code: ags


Guybar.ManualScaling = true;
Guybar.Scaling = 100;



Then that will ignore the walkable area scaling??
Sorry I cant test this myself cause I am not at home.  ::)



monkey0506

That should work to make the Guybar character ignore any walkable area scaling level and use a 100% (normal) scale level instead.

Danman

Thanks a lot monkey. I have had this problem before and just removed the walkable area in that area. Then just made that part unwalkable. But that is a lot simpler



Khris

Exactly. It should be enough to remove the single pixel at the character's position, btw.

SMF spam blocked by CleanTalk