Page 1 of 1

Re-sizing imported images

Posted: Sun Aug 03, 2014 7:42 pm
by chaucer345
Hey everyone,

So, I'm working on a top-down 2d game in livecode and I'm trying to use image collision detection to tell when the player has bumped into something. I have a variety of images from our team artist which are great, but aren't scaled to fit in the level the way I want. I've tried re-sizing them with my cursor, but that causes them to pop right back to normal once I leave the card. I know there's probably something I can do with the geometry manager, but at the moment I'm very confused. I should also probably note that I've been importing the images as controls, but I'm not sure what to make of that or if there's another way I should be importing things to make this work.

I'm really lost and would be grateful for any advice that could be provided.

Re: Re-sizing imported images

Posted: Sun Aug 03, 2014 9:47 pm
by dunbarx
You need to lock the size, and perhaps the position as well?

Check out these properties (the LockLoc) in the dictionary, though they are also available in the inspector.

Craig Newman.

Re: Re-sizing imported images

Posted: Mon Aug 04, 2014 6:41 am
by Simon
Actually for a game, I'd say get GIMP or some other image tool and re-size them permanently.
Craig's solution will work for you though.

Simon

Re: Re-sizing imported images

Posted: Mon Aug 04, 2014 12:34 pm
by Klaus
Hi chaucer345,

1. welcome to the forum! :D

2. What Craig said!
Resize your image in Livecode and then select "Size and position" in the inspector palette for that image
and check "Lock location" (checkbox on top), that will prevent further unwanted resizing!

3. What Simon said! :D
It is alway to prefer to use images in 1:1 size, so no resizing is neccessary!
Will save memory and CPU time!


Best

Klaus

Re: Re-sizing imported images

Posted: Tue Aug 05, 2014 10:14 pm
by chaucer345
Thank you all for your help, locking size and position aided me a great deal!