open and close objects

Started by mouldy, Mon 07/08/2006 09:38:26

Previous topic - Next topic

mouldy

To make objects like doors and cubboards open and close do you just make a open sprite and a close one then put it in a view, then when the player interacts with it you make them walk to it then get it to play view?  ::)

Ashen

I'm not sure, but I think you answered your own question...
If you want to animate something opening (doors, draws, a giant scary eyeball in the ceiling) then yes, you assign the sprites to a view then use Object.Animate. However, if you only have two sprites (fully closed, fully open) you might as well use Object.Graphic to change it directly, and save the loop for something else (not that the view/loop limit is that low, but if you've got a lot of 'background' animations like this, they can add up).
I know what you're thinking ... Don't think that.

Dan_N

Yeah, it's that simple.

Or do you want to make a GUI for open/close objects (doors, drawers, cupboards etc.)?

mouldy

Oh okay didn't know it was that simple why how can you make it do it from a GUI?  :o

mouldy

Okay I try to do that but when I put the door in the room it's huge any info on how to get it exact size as wall?

Dan_N

Copy the portion of the room background where your door should be, paste it into a new file, then draw the door over it and then import it into AGS. Simple, really, I can't believe you couldn't do that.

(P.S.: no offense, but i could hardly understand what you said in your last post, if you get my drift...)

Ishmael

If you have a program that supports layers, such as Photoshop or Paint Shop Pro you can draw your objects on a new layer over the background, then just copy it from that layer to a new file and resize the canvas in that new file down to meet the size of the object, if neccesary.

And doing stuff like opening doors with a GUI would work for a very small game, but in a bigger one the GUIs would just clutter up, so using objects is a better idea in my opinion.
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

mouldy

Ah I get you now thanks for the help  :D

SMF spam blocked by CleanTalk