I don't have time to download and look at it now ... but does this demo show the actual issues, or the workarounds?
I added an autorun event on the map which does a Call Common Event command, which I think is what you described as not working, and it works perfectly. The mouse cannot be used while either the autorun OR the common event are processing.
I included the 3 scenarios :
1 - Autorun with Call Common Event included (the buggy one)
2 - Autorun with the actual command that should have been called in the Common Event.
3 - The workaround using a parallel event in addition to the Autorun.
It does happen when there is a Wait command in the Autorun.
I tried without and the movements were blocked.
Also, I noted that in case 1, the cursor changes when you hover active elements (that is, which have the <mouse something> comment).
That doesn't happen in the others cases.
So there is definitely something that is "freeing" the mouse actions.
Please take your time. I'm not in a hurry to have it fixed. There are so many other things to do, I can wait 🙂
I have fixed the issue above, where an autorun or player-triggered event would call a common event and the mouse would be incorrectly re-enabled, allowing the player to move around while the calling event is still in progress.
Please download the latest version from Pastebin.
Changes are:
- 2 methods added for Game_Map (previously there were none; these methods OVERWRITE the original, rather than aliasing it, so if you have other scripts that alias these methods, the mouse script needs to be placed above them)
- small change to Game_Interpreter.setup method
Great !
Just tried it and works like a charm.
Thank you !
My line 281 reads:
pos = [x, y].pack('11')
What version are you using? Can you get the latest and greatest?
Have you modified it? Are you using a custom battle script?
I'm using version 1.8, so the only thing I'm missing is the update for the common event.
I haven't modified it in any way except to select a different icon for the mouse cursor
I'm using Yanfly's Battle Engine.
I've carried on play testing, but haven't been able to reproduce the error again so far. It has only happened twice in all the many, many hours I've play tested since version 1.8 came out, but both those instances have been in the last couple of days.
Those methods have NEVER been changed, since the script was first released.
Can you try changing that line to these lines instead:
begin post = [x, y].pack('ll')rescue p sprintf('mouse script error on pos = [x, y].pack(\'ll\'); x is %s, y is %s', x.to_s, y.to_s) return nilendand play with the console on. If it happens again, let me know what's in the console.You're better to copy/paste that rather than type it in - that's ll, the letters, not 11, the numbers, which you wrote above.
I immediately get the message
SystemStackError
stack level too deep
Should I have also deleted line 282 which reads
return Scr2cli.call(self.hwnd, pos) == 0 ? nil : pos.unpack('ll')
mmm ... just change it back to the way it was. I'll have to spend a bit more time on it, and I'm about to shut down now.
i'd hate to sound like an idiot. But, why doesn't it work?
I put in the comments but nothing happens. Like, i put <Mouse talk Phil> for example. And when i goto test play, i hover my mouse over them and nothing comes up.
What gives? :T
Did you install the script in the right place? Is it exactly as it is in pastebin, or have you made any mods to it?
Can you post a screenshot of your event window (the whole window, not just the command)?
Have you checked that the icon indexes are all correct? If you want, you can zip up your project (uncompressed - I want to see the events, resources and scripts) and send me a link to download it (not on 4shared or anywhere that requires me to register) and I'll take a look at it. I'm sure it'll be something really simple.
Erh... well. I've not changed a single thing on the script for icons. So it can't be that... :T I'll send you the file in a moment.
Edit: What can i use to let you download it?
Just zip it up and load it up somewhere - mediafile (is it still around?), dropbox, anywhere that doesn't require me to register and isn't 4shared.