I'm making a stamina system to Blizz-ABS, and I'm wondering if the game runs smoother if I write it into a script instead of parallel process common event.
I know (in theory) how to write the syntax into a script, but I don't know if the correct classes and how to actually make it work.
Here is a skeleton of the common event I would be using, but before I finish it I would like to know the answer to this Q.
https://gyazo.com/512ffa77b7005d42dd7858140c7770b9
(https://i.gyazo.com/512ffa77b7005d42dd7858140c7770b9.png)
I don't think events impact performance too much compared to scripting. There are just certain things that are easier via script e.g making a battle system that has tons of different variables. Events that use pictures can also be greatly improved by either removing the need for 100 pictures for a health bar (one for each percentage) or by allowing them to be manipulated (rotated, resized, etc.) In your case, it would be the same either way unless you wanted to apply it to npcs aswell.
Events are pretty much translated into Ruby code anyways. That translation process would probably slow it down in theory, but it's hardly noticeable. You're not really doing anything resource intensive anyways (basic arithmetic) that warrants converting the event to a script.
Just remember that Wait commands are doubled. If running a 40FPS game (which is the default), a Wait of 20 frames is 1 second. Of course you could just remove the * 2 if you wanted.
#--------------------------------------------------------------------------
# * Wait
#--------------------------------------------------------------------------
def command_106
# Set wait count
@wait_count = @parameters[0] * 2
# Continue
return true
end
Thanks, I'll just keep using the common event then.
@KK20 that's weird, didn't even know that.