Hi all. I've been trying to make some stuff happen in my game and I can see that the use of "Parallel Process" is starting to break things apart, meaning, some things work on some maps and in others don't. If there's like too many (in my case around 4-5 ) events some stuff just don't work right. To fix all that I want to start adding stuff direct to the update/draw function on the player/event as needed. Starting with the player I saw that there's a update function (for input and calculating stuff) and a refresh one that I assumed it's related to drawing on screen. So this is what I had:
[IMG]https://dl.dropboxusercontent.com/u/22813242/Help/stealth.PNG[/IMG]
So I started doing this:
[IMG]https://dl.dropboxusercontent.com/u/22813242/Help/stealth2.PNG[/IMG]
Is this the best (read right) place to this sort of edit, or there's a better one or one you guys would recommend for this kinda stuff?
I dont understand what you want to do exactly?
Do you want to convert your Events into RGSS?
And where you place your edit depends on what exactly you want to do.
So you want to make a stealth system?
Yeah it was lagging pretty bad. I moved to the players update as I said and it's funny that doesn't lag there even If I don't check if the region changed. A parallel process works as a logical thread right?
It was lagging because, on every iteration, you were telling it to do a screen tint that took 3 frames to complete, even if you didn't NEED to do it. And once it was done, because you had no Wait, it was telling it to do it again immediately afterwards. You were hardly ever giving it a chance to do other stuff.
I would be really interested to see you change your parallel process to what I've described above, temporarily comment out your script changes, and see how much of a difference it makes.
Parallel processes SHOULDN'T cause much lag, but you have to be smart about how you design them. This is why I'd like you to try it. It's lagging because there's a couple of flaws in your design. The better approach would be to figure out what they are and fix them, rather than modifying scripts to compensate.
That control variables to set variable 14 to the current region (which I forgot to do, so good pickup) should be done immediately after the conditional branch to compare them (as soon as you know they're different, set the 'last region' to the current region id, since it's not used anywhere else. That just makes your event a little shorter, rather than doing it in every internal condition.
So do you still need more assistance with the script version, or is it all good now?