MonkeyFrog

Villager
Member
Joined
Oct 29, 2018
Messages
17
Reaction score
3
First Language
English
Primarily Uses
RMMV
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. :)
 

MonkeyFrog

Villager
Member
Joined
Oct 29, 2018
Messages
17
Reaction score
3
First Language
English
Primarily Uses
RMMV
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. ;)
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,502
Reaction score
413
First Language
German
Primarily Uses
RMMV
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.
 
Last edited:

MonkeyFrog

Villager
Member
Joined
Oct 29, 2018
Messages
17
Reaction score
3
First Language
English
Primarily Uses
RMMV
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.
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,502
Reaction score
413
First Language
German
Primarily Uses
RMMV
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.
 

MonkeyFrog

Villager
Member
Joined
Oct 29, 2018
Messages
17
Reaction score
3
First Language
English
Primarily Uses
RMMV
Thank you so much! It works perfectly now (and makes perfect sense)! I truly appreciate your help. :)

sound2.jpg
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,502
Reaction score
413
First Language
German
Primarily Uses
RMMV
Good Job, looking good =).

Maybe demark the Direction Fix on the Lower left if needed.
 
Last edited:

MonkeyFrog

Villager
Member
Joined
Oct 29, 2018
Messages
17
Reaction score
3
First Language
English
Primarily Uses
RMMV
Yeah. I noticed this after posting the screen shot. It's unchecked in the working version. Thanks again.
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,502
Reaction score
413
First Language
German
Primarily Uses
RMMV
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)
 
Last edited:

MonkeyFrog

Villager
Member
Joined
Oct 29, 2018
Messages
17
Reaction score
3
First Language
English
Primarily Uses
RMMV
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. ;)
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,502
Reaction score
413
First Language
German
Primarily Uses
RMMV
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?
 

MonkeyFrog

Villager
Member
Joined
Oct 29, 2018
Messages
17
Reaction score
3
First Language
English
Primarily Uses
RMMV
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.
 

MonkeyFrog

Villager
Member
Joined
Oct 29, 2018
Messages
17
Reaction score
3
First Language
English
Primarily Uses
RMMV
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!!!
 

Latest Threads

Latest Posts

Latest Profile Posts

New Weapons.gif
No more spam from me today, I promise! Just wanted to upload this, people have been giving me feedback that my weapon sprites (which were RTP) clashed badly with my battlers for ages, so today I finally took the plunge and updated them! Really happy with how they came out :D :D
So Facebook fraudulently took money from me. They even went through my PayPal accounts to find a card that had the money on it. Thinking about deleting my Facebook account because this doesn't happen on twitter, not even close.
Today the 2nd part of the RPGMakergame "A Thief's voyage" came out.


Go show DutchPowerCreations some love.
love it when you forget to put a certain thing in the movement route and suddenly a character starts spinning at 10000 rpm
I'm sorry. I have a bad feeling I've been manic the past couple of days. Antidepressants have only been making things worse somehow -- too drowsy to function, followed by insomnia. Why not making me go crazy to boot?

Forum statistics

Threads
116,992
Messages
1,103,652
Members
152,887
Latest member
xWildSlicerx
Top