Page 1 of 1

sprite resizing

PostPosted: Sat Sep 17, 2011 7:37 pm
by Fojam
can we add a feature to resize a sprite after you have added into the game? just so we dont have to manually scale sprites in mspaint

Re: sprite resizing

PostPosted: Sat Sep 17, 2011 8:41 pm
by skydereign
Well, we can't directly resize individual sprites, but in 1.5 you can resize actors. So that'll achieve the same thing, and it has already been implemented in 1.5.

Re: sprite resizing

PostPosted: Sat Sep 17, 2011 9:11 pm
by Game A Gogo
meanwhile, you can use a canvas and use the draw_from function to draw an existing actor with different scales. Reffer to the documentation if you need help with the function, or click on the variable/function button so it'll give you a parameter window

Re: sprite resizing

PostPosted: Sun Sep 18, 2011 2:16 am
by Fojam
to skydereign, how do you resize the actors?

Re: sprite resizing

PostPosted: Sun Sep 18, 2011 3:47 am
by skydereign
In gE 1.5? You use SetScale, which is a function that changes the actor's size. Mind you this only works with the physics version of gE. If you want to use canvas, you can use draw_from, as follows.
canvas -> Draw Actor -> Script Editor
Code: Select all
erase(0,0,0,1);
draw_from("actor", width/2, height/2, 2);

What this does is draw actor at a scale of 2 in the middle of the canvas. You could move the canvas around to use this, or offset where the actor is drawn.