I usually don't have any problems with eventing, but I really don't understand what's going on right now.
Basically, I have a quest in my game that has you kill as many monsters as you can within 5 minutes. Once the timer reaches 0, a parallel process common event kicks in, stops the timer and notifies the player that the time is up and he/she should return to the questgiver NPC. Everything works fine, except once the event kicks in, it aborts battle for no reason (if the player is in one) and completely skips over the text. You see the message window appear for a split second, but it disappears instantly. I tried setting a wait command after the text, but no help. I made a fresh new project and did the exact same thing, and it works just fine. Message is displayed properly. I also simply created a parallel process common event with random text to let it run in the background, and in the fresh project the text is displayed properly, but in my project it keeps getting skipped over. It's as if the parallel process does not stop to wait for anything to be completed, even "Wait" command itself, but just rushes through all the commands.
So I am unsure about what's happening here, could it be some kind of script interference? I am using RTAB for battle system, and Multiple Message Windows by Wachunga/ForeverZer0 if it's important.
I'm actually pretty sure this didn't happen before, as I've had similar situations like this and don't remember having problems. I have added a few scripts to my project since then but they are not even related to messages or such in any way, so I don't see how they could cause this. If it's script related at all.
hmm, double check that you did everything EXACTLY the same. Sometimes you don't notice that you check a box here or there. I have a feeling it would be the battle system, though it shouldn't. Try moving "main" above all custom scripts and test it. Then slowly add scripts back and see when it happens.
Yeah everything's the same, it's just a simple test. I don't really know if it could possibly have anything to do with the battle system, because this happens on the map as well. I'll try to rearrange scripts but I always have trouble with this... :P I use around 40 custom scripts in my project, re-arranging them may fix an issue, but always pops up new ones as well. Kinda need a professional to do it for me here, haha.
In Scene_Battle (default RMXP script and RTAB):
# If timer has reached 0
if $game_system.timer_working and $game_system.timer == 0
# Abort battle
$game_temp.battle_abort = true
When you said you tested this in a new project, what exactly did you do? As soon as your timer hits zero, the battle should end.
Ah yes, what I meant was that the message wasn't skipped. Battle was interrupted as usual, and the part of code you posted explains that perfectly. Good to know it's not a bug, and I can change it if I desire. :) However, the message part still remains. In a new project, I can set a message to a parallel process event just fine, it's displayed and stays until the player disposes it. But in my project it instantly disappears before you can even see it. This is the issue I need to solve.
Also want to point out that parallel processed common events are not updated during battles. With RTAB on top of MMW
- Troop event: span 'Turn', condition 'Enemy HP < x%', event commands: Call common event 1
- Common event 1: Trigger=None, Show Text command
Message was showing up and didn't disappear until I pressed a button.
I'm about to shoot myself. ~_~ I have narrowed down the problem but this is still so confusing...
I'm simply testing with a parallel process common event that just has a line of text and a 'wait' in it, to see if the text is displayed properly or disappears. I dug out some old backups, and on one from 2 months ago everything seemed to work fine. Because difference in the amount of scripts was too high, I tried it out on a backup from 1 month ago as well, and it worked fine on one map, but didn't on another. I then tested it again back in my current build, and the issue does indeed seem to depend on where you're standing on the map, which makes absolutely no sense to me... If I'm in a corner of a map, the message is displayed normally. If I'm not, it bugs. In fact, it's only the corner that has my invisible parallel process/autorun events for weather, picture overlays and such. The text window is automatically placed on those events for some reason, and then works fine. If the events are not in sight however, the message window appears in the middle of the screen and instantly disappears instead of staying and displaying text like it's supposed to.
Could it be that the MMW script cannot find a target to display the message on for some odd reason? It works fine on any other type of event besides parallel, though... I also cannot find any kind of relation as to why the text would display on those events.
Quotethe message window appears in the middle of the screen
Middle of the screen or over the player's head? Either way, my messages are not instantly disappearing.
Seeing as MMW makes it look like the characters are talking, it makes sense that the windows are being displayed over certain events. If you could show/describe me an example or provide a demo, I could look better into it.
Okay, I was in the process of making a demo for you and I figured it out. Well, what's causing it at least, but I still don't understand why...
I just made a new project and copied the scripts.rxdata from my real project into it. Then tested the same thing again, parallel process common event with text. To my surprise, it worked properly. I copied the autorun weather event to it as well, and this is what's causing the issue for some reason. Ever since I copied it over, the text displays above that event instead of the player, and if I go away from it, the message starts disappearing.
Now, why on earth is it doing this? This is a screenshot of the event. I see nothing wrong. I really don't see how it could interfere.
If you want I can upload the demo as well, but you do need an RMX-OS server.
Edit: Wait, what the hell. Now it's appearing on a different event entirely. Ok I'm clueless. I'll upload the demo.
Edit2: Here it is - http://www.upload.ee/files/3349925/Project1.rar.html
(If you're going to check it out, could you please take a quick look at something else as well? I was going to post about it at some point. Basically, for some reason the battlers of all party members keep changing to the battler of the first actor when you close/restart the game. No idea why this is happening, but it is quite gamebreaking. No need to do a thorough analysis, but maybe it sparks a quick idea? Don't want to take too much of your time. :x)
The message window, if not given an event to display over, will try to display itself over the most recent event being interpreted, as seen here:
# Get rid of "\\P" (position window to given character)
if @text.gsub!(/\\[Pp]\[([0-9]+)\]/, '') != nil
@float_id = $1.to_i
elsif @text.gsub!(/\\[Pp]\[([a-zA-Z])\]/, '') != nil &&
@float_id = $1.downcase
elsif @text.gsub!(/\\[Pp]/, '') != nil ||
($game_system.message.floating && $game_system.message.resize) &&
@float_id = $game_system.map_interpreter.event_id
and all of the method #reposition, but most importantly the lines
else # not in battle...
char = (@float_id == 0 ? $game_player : $game_map.events[@float_id])
if char == nil
# no such character
@float_id = nil
So an event with an autostart is the most recent event being interpreted. Talk to an NPC and the message will now be displayed over that.
I can't help you with your other problem as that sounds to be a problem with saving data in RMX-OS.
Ahh, that certainly explains it. So it was disappearing because the event wasn't in range, and appeared on it when it was.
About the other problem, I guess I have to request someone for a patch then. D: Can't see many takers on that, though... Quite a shame to find it out this far into development. I can't really change the battle system.
Thanks a lot for all the help! Much appreciated!