Rolling Snowball or Stone Event

Yawgmoth

Veteran
Veteran
Joined
Jan 9, 2018
Messages
138
Reaction score
11
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

Resident of Silent Hill... Apparently
Veteran
Joined
Jun 22, 2019
Messages
723
Reaction score
3,796
First Language
Absurdism
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
39,960
Reaction score
13,589
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

Resident of Silent Hill... Apparently
Veteran
Joined
Jun 22, 2019
Messages
723
Reaction score
3,796
First Language
Absurdism
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,492
Reaction score
408
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/inde...-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

Resident of Silent Hill... Apparently
Veteran
Joined
Jun 22, 2019
Messages
723
Reaction score
3,796
First Language
Absurdism
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,492
Reaction score
408
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

Resident of Silent Hill... Apparently
Veteran
Joined
Jun 22, 2019
Messages
723
Reaction score
3,796
First Language
Absurdism
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
138
Reaction score
11
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

Am I up for another full-time day of game dev? Let's find out! Got coffee, got music; let's go!
The right kind of creativity is adding your flavoring and layering on tested and proven tropes, not tearing them down and rebuild things in your image. Just like how you don't cook eggs with a brick or a chainsaw, but instead learning on how to make your eggs look good and different than the other eggs.
Stream will be live shortly with some Darkest Dungeon! Feel free to drop by!
Ah! Another nice "clear day" in....
//Smacks a nearby fleshy mass
No you! Me time, not you time! :kaolivid:
//Looks back
Where was I? Oh yes, another...
//deep breath and coughs
...nice clear day in Silent Hill. :LZSexcite:
Finally logged back to my RM central account... it's been a while.

Forum statistics

Threads
103,462
Messages
999,492
Members
135,002
Latest member
Narfsnarf
Top