getbrush from picture ie fomr x=10, y=10, width/height=10

Find quick help here to get you started with Hollywood
Post Reply
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

getbrush from picture ie fomr x=10, y=10, width/height=10

Post by Bugala »

Im pretty sure i have already done this, but i just cant seem to find it anymore from manual nor from my own codes.

I have this picture that has the game character in its different movement phases.

What i want to now do is to make it into animation to use in my game.

I suppose i need to first make them into brushes and then into animations.

So what i am trying to do, is to take brush id 1 from example from cordinates x=100, y=100 and width and height of 50.

So is there for example some command like:

GrabbrushfromBG(id, x, y, width, height)

for i wasnt able to find something like that.

Or do i need to first grab Backgroundpicture as Brush and then Crop it to right size or something?
PEB
Posts: 569
Joined: Sun Feb 21, 2010 1:28 am

Re: getbrush from picture ie fomr x=10, y=10, width/height=10

Post by PEB »

You have to decide whether you want to use Sprites or Layers. (Either one would probably work for you, but you can't use them both at the same time.)
Just check the documentation for more information on both methods.
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

Re: getbrush from picture ie fomr x=10, y=10, width/height=10

Post by Bugala »

hmm, i must have explained bad.

For my question had nothing to do with sprites/layers thing itself.

im going to give example codew of twhat i am trying to do (this imaginary code):

Openscreen(1, 800, 600)
loadscreen(1, "hd0:PictureWithAHouseInMiddleofIt.jpg)
displaypicture(1)

MakeNewBrushFromPieceOfDisplayedPicture(1, 300,300,100,100)
Savebrush(1, "hd0:newbursh.brush")


So in short.
First i open a screen,
then load a picture to it.
Then i want to make that house in middle of that picture as a brush to myself.
And as final, save that brush to harddisk to be used later on other programs.

So is there a command, or a way to do it in something like this:
MakeNewBrushFromPieceOfDisplayPicture, where the () stuff inside would be:
(New Brushes ID, X, Y, Width, Length) S and Y referring to current displayed Screens X and Y.

So in otherwords, i want in this case to take 100x100 pixel piece from displayed screen, and save it as a brush.

Is this doable some way?
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

Re: getbrush from picture ie fomr x=10, y=10, width/height=10

Post by Bugala »

So if there is no such command as im looking for, then what is the handiest way of making brush from only piece of picture?
Post Reply