About Common Events, Map Events and Buttons...

CEO1234

Veteran
Veteran
Joined
Jun 3, 2019
Messages
71
Reaction score
5
First Language
English
Primarily Uses
RMMV
Is there a way I can make an event on a map respond to a common event after I press the ENTER key or any other key I would like? It could also be conditional, like if you only have something equipped or if you have a certain item, etc... Of course, I already know how to bind a common event to a map event. You just use the command for that. But what I have set up relies on the condition that a certain item be equipped (in this case the Shadow). Then once the action button is pressed, the following in the picture below would happen. But nothing happens, since the animation doesn't play. I made sure the switch was turned on properly and everything.

Heart Event.PNG

Also, I would prefer not to use the action key. It's too clunky since every time you equip an item, it's animation plays automatically because the common event it uses is tied to the ENTER button which is what you use to select something from the menu. Sure, I could just make the common event be tied to a different button, but then things wouldn't be as intuitive for the player. For example, if I were to choose Page Down, they would assume that's what all events would respond to when they have the item equipped. But only ENTER would work (if I can even get it to work). Also, have a look at the common event I used for the Shadow item in case it'll help.
Shadow.PNG
 

Attachments

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,254
Reaction score
1,254
First Language
Spanish
Primarily Uses
RMVXA
technically yes, but if you're going to design a hook for a key press on the map, you'll have more flexibility by reworking the interface and watching for that key press than having a parallel event do that.
the window objects already watch the input module constantly.... why not use those?
 

CEO1234

Veteran
Veteran
Joined
Jun 3, 2019
Messages
71
Reaction score
5
First Language
English
Primarily Uses
RMMV
What do you mean by reworking the interface? How would I make good use of the window objects? I don't know how to tie a specific event from a specific map to a common event. Am I just misinterpreting what you said? I'll give it a shot anyway though. Thanks for the help so far.
 
Last edited:

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,254
Reaction score
1,254
First Language
Spanish
Primarily Uses
RMVXA
I mean using the scene proper to watch for specific key presses doing specific things, rather than having the interpreter handle that through a common event in parallel.
the interpreter runs under the map scene, but you can add another system at scene level that'll take care of the input and relay that to the interpreter, which will handle the effect.

that's how action battle systems work: they don't have a battle scene, they use the map as map and battle scene at the same time, and the input decides which stance the character is at, at any given time.
 

CEO1234

Veteran
Veteran
Joined
Jun 3, 2019
Messages
71
Reaction score
5
First Language
English
Primarily Uses
RMMV
I must sound like a complete moron to you at this point but how would I create my own type of interpreter? How would I add another system at scene level? Obviously it seems common events and parallel processes aren't the way to go. Unless you think I could still use those for something. Do I need to know JavaScript for this? Is there some code or something you could tell me about that would help? I'll give credit of course. You don't have to teach me the code, just send it to me so I can look it over (only if you feel like it).:kaoback:
 

CEO1234

Veteran
Veteran
Joined
Jun 3, 2019
Messages
71
Reaction score
5
First Language
English
Primarily Uses
RMMV
Also, is there a way I could use Yanfly's Button Common Events for this? Or perhaps Yanfly's Call Events (from a different map)? If there's not then just mention why. I don't really know if those would be helpful but just thought they were worth mentioning.
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,254
Reaction score
1,254
First Language
Spanish
Primarily Uses
RMVXA
you don't create your own interpreter, you *use* the interpreter from the game, which already has the functions you need.

How would I add another system at scene level?
quickest way would be to add a window that'll take care of the input, much like the battler status window and the party action window takes care of inputs during the battle scene, with the battle scene proper only responding to those inputs and rendering the effects.

all *scenes* are similar in that they all respond to inputs from the player.
the difference being, that the map scene updates the map and renders everything at the same time it reads the inputs and relays orders to the interpreter in the background for processing parallel events and watching for interaction with map events.
the battle scene waits in between inputs and effects, for the effect to finish, before going back to reading inputs from the player.

Do I need to know JavaScript for this?
yes.

Is there some code or something you could tell me about that would help?
look into Action Battle Systems, there's a number of them out there.
of course, you'll have to use that as a foundation and build from there, so that everything comes back to the functions that that system can handle.
if you already have a system in place, it'll have to be adapted.

an ABS would have most of the upgrades you need to the map scene already in place.
you can focus on learning about those, which in turn will lead you to learning about the interpreter.
 

CEO1234

Veteran
Veteran
Joined
Jun 3, 2019
Messages
71
Reaction score
5
First Language
English
Primarily Uses
RMMV
I feel like I should've specified before. My game will have no battles 'separately.' Any action that happens will just happen in real time (kind of like how it is in Zelda, not Pokemon). I just wanted to use an item on an event and then have that event react to that item (an equip-able item from the menu). After some time I have actually figured out how to do it. As you said earlier, it may not be the best way to do it, but it worked. I created a parallel event that checks for the player's X and Y coordinates then tied them both to 2 variables named X and Y. Then I used four conditional branches and tied them each to all directions (it is different for each event since every event has a unique location). I then used a switch for each unique item I had that only turns on when they're equipped. This means the trigger will only work when one of those switches is on.

What's great about this is that it means I have more button options, since you can tie the conditional branches to more than just ENTER. But for some reason, when the player is facing down (back of an event) it never works. Also, it doesn't work for events that move, only stand-still ones. I really do feel like JavaScript is the way to go here. But I don't know any and don't know what type MV uses. So do you know any good plugins for this, or better yet a good way I could teach myself? At this point I feel like I should just start focusing on JS. Is there a place like that on these forums? I bet there is. Maybe I should start a new discussion there and just have this one end. But I want your two cents first. You've really been a great help so far. Thanks.
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,381
Reaction score
8,537
First Language
English
Primarily Uses
RMMV
Also, is there a way I could use Yanfly's Button Common Events for this? Or perhaps Yanfly's Call Events (from a different map)? If there's not then just mention why. I don't really know if those would be helpful but just thought they were worth mentioning.
I currently don't have a computer that can run MV, so I can't say for sure. However, I currently have his Button Common Events script in an Ace project and that is exactly how it works - you push a specific key, and it makes a common event run.
 

CEO1234

Veteran
Veteran
Joined
Jun 3, 2019
Messages
71
Reaction score
5
First Language
English
Primarily Uses
RMMV
I currently don't have a computer that can run MV, so I can't say for sure. However, I currently have his Button Common Events script in an Ace project and that is exactly how it works - you push a specific key, and it makes a common event run.
I think I could start there. I'll see what I can do. This could work on moving events also.
 

CEO1234

Veteran
Veteran
Joined
Jun 3, 2019
Messages
71
Reaction score
5
First Language
English
Primarily Uses
RMMV
I couldn't really figure out how to use it. However, you guys have still been a big help. :kaoblush:

I feel like I should just move on to JS and see what I can find there. JS is just more flexible to work with. I guess this means this thread has ended for now. By the way, I do like the idea of an Action Battle System in real time for a future project, so perhaps I will look into that as well.

Even for my current project it should be a big help, though I don't know if I can use it for anything other than battles.
 

Zarsla

Veteran
Veteran
Joined
Jan 23, 2015
Messages
710
Reaction score
228
First Language
English
Primarily Uses
Lots of things I want to tackle so:
1. an abs can be used as a battle system but it doesn't have too, it just makes it so you can do things on map like have events responded to certain button presses or things being equipped.

Now as for your OP question:
I might be missing something.
Are you interacting with the event, ie next to it and touching it and pressing the action button. Or are you on the other side of the map pressing the action button.
Because if you're not touching the event as you're pressing the action button, it won't trigger. at all.
 

CEO1234

Veteran
Veteran
Joined
Jun 3, 2019
Messages
71
Reaction score
5
First Language
English
Primarily Uses
RMMV
I just figured out why it wouldn't work. I got confused. You see, events by default are triggered by pressing Enter. But I tied my items to the Page Down button because the action button already has so much functionality attached to it.
Problem is that it won't respond unless I press Enter, but the player won't intuitively know this, since their items are attached to Page Down. As I tried before, I could use conditional branches and change the default button by making it parallel. I would also need to use precise X and Y variables. But that's just not a good design because it takes forever and isn't too straightforward. Plus it never seems to work from behind and can't work with moving objects.

So yeah. I'm working with events that need you to be close by to trigger.

I think I'll search the JS boards and see if I can find a good Action Battle System plugin. That sounds like a good start. And hey, at least my events actually work. Relying on the Enter key will just be a placeholder for now.
 

CEO1234

Veteran
Veteran
Joined
Jun 3, 2019
Messages
71
Reaction score
5
First Language
English
Primarily Uses
RMMV
Also, is there another name for Action Battle System? Like, mine won't explicitly be for battles, it's just to make things easier for map eventing. What would you call a more general version of this plugin?
 

Zarsla

Veteran
Veteran
Joined
Jan 23, 2015
Messages
710
Reaction score
228
First Language
English
Primarily Uses
1. No double posting, just edit your previous post.

2. I would just make your event trigger, event or player touch, then check if you're pressing page down and run a common event.

3. No not really. It's called an Action Battle System, or ABS for short.
 

CEO1234

Veteran
Veteran
Joined
Jun 3, 2019
Messages
71
Reaction score
5
First Language
English
Primarily Uses
RMMV
I feel quite silly not seeing that as the solution before. Thanks. I will be sure not to double post from now on. Sometimes I just get so involved I forget that important rule. Anyway, will give that a shot.

Update: It worked! It works for moving characters as well. I think I'll use the Yanfly plugin to tie events to the Shift key instead, but other than that, it's exactly what I wanted. It makes everything feel so smooth now. All I needed to do was add a 30 second wait command to stop things from 'overlapping', otherwise events would play all at once.

Update 2: I realized that for moving events this solution does not work 100% of the time for some reason. I made the events always turn towards the player using a set movement route command but this only made it work about 80% of the time instead of like 50%. This is a great improvement, but

Button Example.PNG

it's still not good enough. Like at least 99.99% needs to be the standards. Here is a picture of my example code above. It doesn't use common events because it's just an example. I just swapped between character skins so something would happen using a self switch. Nothing special but it did highlight something wrong. It doesn't matter if I use event touch or player touch, the result is the same.
 
Last edited:

Zarsla

Veteran
Veteran
Joined
Jan 23, 2015
Messages
710
Reaction score
228
First Language
English
Primarily Uses
You have to be pressing a direction key for it towork while moving.
ie if you're facing right and you're talking to it by facing right, you need to press right, for it to work.

Now if you want to bypass that all together you can use himeworks buttton labels.
It will make other buttons act like action button, I recommend using event touch for the events.
 

CEO1234

Veteran
Veteran
Joined
Jun 3, 2019
Messages
71
Reaction score
5
First Language
English
Primarily Uses
RMMV
You've been such a big help. This could be the final piece of the puzzle.Shadow Effect.PNG

Update: Or it would've been but alas there's another problem. When I use the label command in my common event for my item, it doesn't work. You see, I want it to work in the common events as well as with events on a map because I want an animation to play every time the player presses the Control (Crtl) button. I tried making the event not parallel but that also doesn't work. If it is parallel, the animation plays constantly and the button press label does nothing to stop it. It's like it's not even there. This is not an issue with map events. I'm pretty sure a conditional branch would solve this issue, but I don't know how to implement the command in this format. Does anyone know a script call for the control buttons (left and right)? This can be a part of a conditional branch. But such a script call seems awfully specific. There must be a better way. And of course, the Control button is not an option in the default list of buttons for a conditional branch. Typical... :p I could try using Yanfly's extra button options on top of this plugin. After all, they're compatible...

Update 2: Oh wait! Nevermind... The Control buttons aren't an option in the Yanfly plugin. Oh well. Perhaps I could only tie one common event per button anyway, but nobody ever shows the Ctrl buttons any love. ;_;
 
Last edited:

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

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D

Forum statistics

Threads
106,051
Messages
1,018,551
Members
137,837
Latest member
Dabi
Top