Play Sound On Door Close?

● ARCHIVED · READ-ONLY
Started by MonkeyFrog 13 posts View original ↗
  1. Hello all. I am just learning how to work with RPG Maker MV and am having a little issue. I've create an event that allows me to move a ball over a particular square. Once there, it opens a door somewhere else. If I move the ball off the square, the door closes again. Nice! Works a charm. I also made it so that a door sound plays when the ball is moved over the square. But when I move the ball off the square, I cannot find a way to get it to play a sound. Here's a screen shot of what I've done:

    sound.jpg

    If I simply place the Play SE under the Control Switch under Else (the one that turns off Dungeon Door 2) then it will play the door sound with every push (of course). The end result I want is for the sound to play when the ball is pushed onto the square (and the door opens) and for the sound to play if the ball is pushed off the square (and the door closes). It is important that the player is able to move the ball onto and off of the square.

    Any help would be appreciated. Thanks in advance. :)
  2. To sum up ... I just need the door sound to play ONCE when the ball is move onto the square and ONCE when the ball is moved off of the square and no other times. ;)
  3. You need an extra Condition for the Off push Sound. It can only be pushed off if it was previously pushed on the tile.
    So i would suggest Turning an additional Switch to On when the Ball is on the Target.
    And everytime you push the rock you check when event not on destination tile, but the switch is ON, than turn Switch OFF and play the Sound and Close the Door.

    Insteed of using an Event as target, you could use the Map Coordinates directly, or is your door trigger moving around on the map? (But it doesnt matter, just wanted to mention it)

    EDIT: I should read better, you just need to put a conditional branch in the else case, it checks if the switch is on, if yes only than it turns it off and makes the sound and closes the door. So no extra switches needed.

    Edit: Remove your direction fixes, i see no use for them.
  4. Thanks for the help. I will noodle through that.

    Actually, it's not using an event, but a map coordinate. In the "push ball" it checks itself against the map XY coordinates. If it's own coordinates match the "switch" coordinates (simple a graphic on the ground) then it triggers the door opening and the door opening sound.
  5. No Problem, just let us know if something still aint working or in case its solved or in case it needs to be pimped up.
  6. Thank you so much! It works perfectly now (and makes perfect sense)! I truly appreciate your help. :)

    sound2.jpg
  7. Good Job, looking good =).

    Maybe demark the Direction Fix on the Lower left if needed.
  8. Yeah. I noticed this after posting the screen shot. It's unchecked in the working version. Thanks again.
  9. Ah one more starter tip. You could make this nearly to a copy paste event for other maps.

    You are setting the Variables to the Push Ball Event, you could select "This Event" instead.
    Than you safe some editing when copy pasting.

    instead of a location you could also ask if the event is on a certain region, like region 42.
    That works with the "Get Location Info" Event Command. You just Map the Region on the spot where the Ball should go.
    (But this shall only demonstrate that there are several ways to the same outcome)
  10. Thanks! I am all for shortening the "code" and for reusing it where possible. So, copy and paste is great. I'll play a bit more and then it is off to make a multi-ball trigger (place three balls on three different squares) to open a door. ;)
  11. Does it matter on which positions the balls lie? or is it just to put 3 ball on 3 spots no matter which? or does every ball have a specific spot?
  12. Each ball will have their own spot to be on. But I'll figure it out (ounce I get a chance to actually sit down and work on it). If I have an issue, I'll definitely ask.
  13. Thanks again for all your help, Bex. Because of it, I was able to get three balls to work with three different switches to open a single door. Woohoo!!!