Animate a Dumpster: Opening, Searching, Closing.

Started by GameMaker_95, Sun 25/10/2015 08:20:00

Previous topic - Next topic

GameMaker_95

Hi,

I have a dumpster that I need to search to obtain a backstage pass. I want to be able to click on it to open it, click to search (get the pass), click to close.

Then every other time I open it to search, it says there is nothing else of interest. What would the best way to animate it be (I have all the frames of it) and what script would I need to do this. keep in mind I'm not a noob but I'm close to one.

Thanks in advance.


Kumpel

Hey,

I'd suggest you do the dumpster and trash as one hotspot. over that you put your cover as an object assigned with the view of open/closed. this objects gets a interact-with-function that changes the frame of the cover. The hotspot of dumpsterbox and trash gets a normal interact-with-function which triggers the animation of your guy searching it. Also add an int var to count the second (third, fourth...) time. Then if player interacts more then one time the character says his line.

Hope that helps :)

Cheers
Kumpel


GameMaker_95

Hi Kumpel,

I'll give that a try today and see how I go. I'll let you know if I run into a problem.

Thanks.

selmiak

who throws a precious backstage pass into a dumpster???

GameMaker_95

Haha, maybe it was a last minute gift? It's actually not a backstage pass but that's the best I could describe it.

GameMaker_95

Hey Kumpel,

I tried doing what you said but I ran into a problem with the position of the sprites after they change so I had to make them
two separate objects but I did make the dumpster a hotspot and now it works fine because it's a completely different interaction.

Thanks again.

Kumpel

I think the problem is, that you positioned the sprite for the second frame different from the first one.

But two objects works too. It's just not that elegantly short in script as changing the frame number. :=

I would like to see the scene of yours! Could you do a video or gif of this game situation? :)

GameMaker_95

Do you mean of the character searching the dumpster? Currently I'm just using a placeholder sprite I edited and
A background I'll probably update just to complete the game before I go back and finish everything. If you want to see the background
though, let me know. :smiley:

Kumpel

Sure. Post it here or send me a link if you want!

SMF spam blocked by CleanTalk