Rolling Snowball or Stone Event

Yawgmoth

Veteran
Veteran
Joined
Jan 9, 2018
Messages
114
Reaction score
10
First Language
English
Primarily Uses
RMMV
Hi all,

I am using MV and have a simple event that uses conditional branches to move an event when the player touches it. It's set to move when the player presses up, down, right, or left and has a conditional branch for each. I have a SE attached to each branch and it plays a rolling sound when the buttons are pressed. However when the event is unable to be moved by the player, like when it is against a wall the SE still plays the rolling sound. How can I alter my event to prevent the sound when the event is not moved?

Below is a screenshot of my event, there's not a whole lot to it but it may help.

Also is there a way to activate an event when another event touches it?

Thanks in advance to all who respond.
 

Attachments

ImaginaryVillain

Obviously the "Hero" of Light!
Veteran
Joined
Jun 22, 2019
Messages
226
Reaction score
536
First Language
Event Gibberish
Primarily Uses
RMMV
You can do it using regions, see attached pics. I lazily repurposed an event in my game for it so ignore the whole "below characters" thing I forgot to change. XD

As for event touching an event, not exactly. But you can secretly ghetto it. See I use Galv's Map Projectiles to fire invisible shots from events to other events to trigger switches and/or common events. https://galvs-scripts.com/2016/09/13/mv-map-projectiles/
 

Attachments

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,309
Reaction score
11,910
First Language
English
Primarily Uses
RMMV
FYI you don't need all those conditional branches. You can just do a Move Away From Player command and it'll move in whatever direction the player is facing (so if player is facing down, they would have pressed the down button to trigger the event, and the boulder will roll 'away from the player' which is down).
 

ImaginaryVillain

Obviously the "Hero" of Light!
Veteran
Joined
Jun 22, 2019
Messages
226
Reaction score
536
First Language
Event Gibberish
Primarily Uses
RMMV
The conditionals are really just there to adjust the coordinates to check on the other side of the boulder, and see if the region is an okay one to move the boulder to, along with play the SE if it is.

Edit: You gave me a great idea to streamline an important event in my own game. Thanks! Also updated event for the original poster... This time with way less "I just woke up" mixed in. XD
 

Attachments

Last edited:

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,312
Reaction score
315
First Language
German
Primarily Uses
RMMV
I have the feeling you can ease up your Event code very much.
Here a Eventcode example. For the Sound Problem i used a Scriptline in Eventcommmand Conditional Branch, the Evented way would be also possible but way longer. The Door Opens when you Push the Rock on the Region1 and it closes if you Push it of that Region.
With changing Map the Events would revert positions, depending on your Puzzle, there are workarounds for that too.

I hope this somehow helps.
At the moment i do my Push Events kind of the same like this:
Code:
◆Set Movement Route:This Event (Skip)
:                  :◇Turn away from Player
:                  :◇1 Step Forward
◆Wait:2 frames
◆If:Script:$gameMap.event(this._eventId).isMoving()
  ◆Play SE:Push (50, 100, 0)
  ◆
:End
◆Set Movement Route:Player (Skip, Wait)
:                  :◇1 Step Forward
◆Control Variables:#0012 MyRockMapX = Map X of This Event
◆Control Variables:#0013 MyRockMapY = Map Y of This Event
◆Control Variables:#0014 Location Info for me = 0
◆Get Location Info:Location Info for me, Region ID, ({MyRockMapX},{MyRockMapY})
◆If:Location Info for me = 1
  ◆If:Self Switch A is OFF
    ◆Control Self Switch:A = ON
    ◆Control Switches:#0010 Door Opens = ON
    ◆
  :End
  ◆
:Else
  ◆If:Self Switch A is ON
    ◆Control Self Switch:A = OFF
    ◆Control Switches:#0010 Door Opens = OFF
    ◆
  :End
  ◆
:End
Edit: The Eventcode also works with Player Touch Events.

Thanks @Shaz for the Scriptline =) I found it in one of the other Threads.
https://forums.rpgmakerweb.com/index.php?threads/how-do-you-check-if-a-player-is-moving-or-not-in-a-conditional-branch.61380/ i Edited it for Events with help of the Script Snippet Thread:
https://forums.rpgmakerweb.com/index.php?threads/rpg-maker-mv-script-call-list.46456/
 

ImaginaryVillain

Obviously the "Hero" of Light!
Veteran
Joined
Jun 22, 2019
Messages
226
Reaction score
536
First Language
Event Gibberish
Primarily Uses
RMMV
You're definitely not wrong about me needing to ease up on event code. Part of why I'm offering solutions here is so people come along and tell me there's a better way. Bonus points if it's in Javascript as I'm slowly trying to learn that in my free time. :hhappy:
 
  • Like
Reactions: Bex

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,312
Reaction score
315
First Language
German
Primarily Uses
RMMV
In retrospective its kind of the same for me even if i never thought about it like that.
If you dont understand how or why some parts of the Rock Eventcode work, just ask and we can try to explain. Or if its missing functionality in some Ways or needs Editing, let us know and we can further assist.
 

ImaginaryVillain

Obviously the "Hero" of Light!
Veteran
Joined
Jun 22, 2019
Messages
226
Reaction score
536
First Language
Event Gibberish
Primarily Uses
RMMV
Pretty certain I kind of accidentally hijacked the thread. :hswt2:

Well at least it improved some of my events (even if they had nothing to do with actually pushing anything). And at the very least someone named "Yawgmoth" should be able to appreciate the very Phyrexian idea of repurposing something... Even if it was his thread. :hhappy:
 

Yawgmoth

Veteran
Veteran
Joined
Jan 9, 2018
Messages
114
Reaction score
10
First Language
English
Primarily Uses
RMMV
Thanks to everyone who replied and gave advice. I've been busy at work and it has been almost a month since I worked on my project.

@ImaginaryVillain I don't mind a little hijacking, thank you for your added time and effort. It's appreciated.

@Bex Thanks for your advice concerning the audio issues of the event and for assisting ImaginaryVillain.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I have tried, several times to understand how Markiplier is popular. You can't deny his popularity. I can only get through a few minutes of his vids, though. He's cringier than ANY cringe comp I've ever watched. When I was a kid, if you acted like that, 0 friends and 100% no dates for you. Times have changed XD
Sometimes you may feel helpless and defeated. But everyone loses from time to time. It's okay to be tired. Take a breather. Have a good cry if you need to. You gotta take breaks from your workout, or you'll collapse before you can get stronger.
So, my roommates wrote a news article in English, translated it into Bengali with google translate and now I'm helping them fix the monstrosity which was the result. Making English the medium of education is fine... but not to an extent that we forget how to write properly in our own language :")
Stream will be live shortly with some more Minecraft spriting! Feel free to drop by~

Forum statistics

Threads
93,541
Messages
913,317
Members
123,067
Latest member
SehoraX
Top