Im quite new to this so Im still figuring it out! Im using the Yanfly event region trigger and the gabmessage plugin. Im planning a event where if I step onto this, a gabmessage will show up that this is the way into (example) town and assigning a region tile on it so when I step on that region tile, the event will play out and it works! but the problem is, after I passed/walked over the tile, the event won't activate now unless I exit the map. Any tips or commands to make it triggerable every time I walk on it? Thank you!
Player Touch Event that can be activated again without exiting the map?
RPG Maker MV SupportWhen you're asking for help with events you need to actually show us the event, not just describe it.
Provide a screenshot of the entire event window without cropping any of the settings.
Provide a screenshot of the entire event window without cropping any of the settings.
Hi @Mikochi35p
To make an event that triggers on a region, you don't need Yanfly's plugin (I use it for other things and it's great, but not everything goes through plugins )
Here's a screenshot of my event, which does what you want it to, without scripting.
It's in French, so I'll describe it below:
create an event that runs in parallel with the following commands:
- assign a variable (1) to your character's X coordinate
- assign a variable (2) to your character's Y coordinate
- retrieve information: region ID in a variable (3) determined with variables (1) and (2)
- Condition : if variable (3) region (X) (the number of region you want)
----- Your action (I'll use text, but you can use whatever you like)
----- Wait: this waiting value is your cooldown before the event is retriggered: in my posted example, I set 600 frames because I don't want the message to come back before 10 seconds, even when I'm walking in the same region.
- End of condition
- Wait: 10 frames. This is a wait only to avoid executing the process every frame and making the game lag.
Your method does work, but it has the downsides of adding a parallel process and taking up several of your global variables.
It probably makes more sense to fix what the OP has already constructed than to say "ditch it and entirely remake it like this" 😉
Also, the event would need two more variables to track the player's last position when the event was executed, and additional event commands to compare them - the way you have it written now, it will continuously show the text as long as they're standing there.
I am not sure about the plugins and what difference they make, usually event should activate again and again unless you will create new page and put a self-switch that will lead there when first event is completed.
I would solve it with having 3 pages that are exactly the same.
When first page activated and finished, it goes to self-switch A. So next time player steps in - same happens, but on A page.
Then it leads to self-switch B. And B leads back to A.
But usually not having any extra switches in event should be enough for it to repeat.
I would solve it with having 3 pages that are exactly the same.
When first page activated and finished, it goes to self-switch A. So next time player steps in - same happens, but on A page.
Then it leads to self-switch B. And B leads back to A.
But usually not having any extra switches in event should be enough for it to repeat.
Probably best we wait until OP posts a picture of their event before trying to help, lest we accidentally lead them down the wrong rabbit hole.
hello! sorry I've been gone for a long time! yes it's my fault for not providing a screenshot sorry! The screenshot will be below this message. What Im trying to do here is when I step on the #9 tile everytime, it will trigger the gabmessage "Road to Anthur Town" and it works actually! But for only one time. Even if I step on it again, the gab message wont activate now unless I go out of the map and enter it again. Is there a way for it to activate everytime I step on a #9 tile? Thank you!
Does the first Gab Message delete itself after running the first time?
I was going to ask if you turned off the anti-repetition parameter off in the plugin settings, but it doesnt seem to work and appears to always be on regardless of what its set to🤣
it wont let you queue up a gab that matches the text of the last one shown
change line 226 to read
and it should be good
it wont let you queue up a gab that matches the text of the last one shown
change line 226 to read
Code:
Yanfly.Param.GabAntiRepeat = eval(Yanfly.Parameters['Anti-Repeat']);
wdym delete itself? Like the event literally? or just the gab message that appear on top? Cuz yes, it is, it will appear and fade out after a while and thats how I like it to function, but after that, even if I step on the region tile again, it wouldn't trigger that event or the gab message again.
hello! can I ask where should I go to edit these parameters? I changed the one here on RPGMaker and set the Anti-Repeat to False but those still not works.
edit: I changed it on Notepad++ and its on line 266 and I copy pasted your code but still no luck about it. Still not working.
the parameters are the plugin settings that show up in the plugin manager
first, youd need to set the anti-repeat to false.
then youd have to make the change to the plugin js file your project is using. looking at your notepad++ title bar, it doesnt seem that the file youve edited is the one that your project is using.
that isnt a path to a project folder.
if eval doesn't work, what I do with booleans is to use of "JSON.parse"
which works perfectly, you could add the boolean param if required to
to it off as boolean, didn't test with words though.
which works perfectly, you could add the boolean param if required to
to it off as boolean, didn't test with words though.
ohh I see, yep its not from the project folder! its like the main folder of my plugins. I'll try it!
edit: Hello! it works now! thank you so much! I didn't know that the plugin I need to edit was from the folder project itself. thanks for everyone who helped!
Original thread: https://forums.rpgmakerweb.com/threads/player-touch-event-that-can-be-activated-again-without-exiting-the-map.173151/