Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Chest With Sound

Well I've never posted a tutorial before and when I saw this board I decided to post this.

Right I made this by myself so it may not be super amazing, but it looks and sounds good.

I'm going to post a picture of the event and then explain what to do:
http://img69.imageshack.us/img69/2123/chest1wr.gif[/IMG]
(The black square is because I conected 2 pictures together)

Right first you set it to action key and pick the chest you want (mine's on the side).
Next you need to make it open every time you click on it,
So face left, opening sound, wait, face right, wait.
Now you have the bit to check if you've opened it before. If not,
Face up, sound as it hits the back, you get what's inside (eg. money), turn on a switch (in this case Local Switch A), display a message and then get it to close with a sound when it closes.

Then you want it to say it's empty after opening it, so just copy the above, but with out the item and the switch and display 'It's empty...'



If you didn't understand any of that (which you probably didn't because I'm not good at explaining), just copy the picture...


Credit also to alexanderpas for shortening my previous one :D


Hope it helps :D
Enjoy ^_^
 
it is a lot simpler(and loks better) to have a 2 page event. make the sprite for the first page the closed chest, and the sprite for the second event an open chest (the second event should have a precondition of local switch A being on and be a parallel process). when the user opens the chest (show opening animation, play sound, get stuff), local switch A goes on and the event changes to the second page. this way, the chest will always stay opend if you have opened it instead of going back to the closed spritewhen you exit the screen and come back.
 
It depends on if you want the chest to stay opened after opened (I kina do) or if you want it to close after (someone might)

I'd just keep in mind, the Move Event command can contain Wait and SE commands within itself.
 
So, I've made a non-sound chest using this method, and added such a parallel process. What would be a good way to add a message such as "this chest is empty" for those trying to open it again?

Everything I'm coming up with screws with the graphics while the message is displayed; I think I could get around this with a precondition of a switch being off, but I don't know if that's possible?
 
Can someone who knows how to do this upload a screenie of what the 2nd event page should look like? FYI: I'm using the method that Draken used as it seemed much simpler to follow.

I'm just not getting this switch stuff and my 1st event page looks exactly like the one on here but I'm not sure if my 2nd page is right because the chest is now just always open and no text comes up. :/
 

A J

Member

the second page will be like this
the chest graphic the open one (last one)
fixed diriction (bottom left)
the conditional (on the top left) is puted as self switch A
massege (event list) *it's empty*
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top