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
224
Reaction score
523
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,298
Reaction score
11,893
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
224
Reaction score
523
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,311
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
224
Reaction score
523
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,311
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
224
Reaction score
523
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 Profile Posts

I've wondered for a while now... what is it about the YED SV plugin that just doesn't do transformations... I feel it's how it looks up the battlers honestly.
To actually work on my game, or browse these forums about creating my game? Hmmm....
Tanning beds are actually vampire traps. Coffin shaped but the minute they're inside... BAM UV Rays. Dead Vampire.
https://forums.rpgmakerweb.com/index.php?threads/restrictions-limited-move-sets.117489/ A new blog discussion thread draws near! Command?

What do you think of Limited Move Sets?
RPG maker Dev pro tips: 1, back up your project. 2, take care of your back. 3, back up your project again.

Forum statistics

Threads
93,490
Messages
912,914
Members
123,026
Latest member
eveelynn
Top