16.11.2013, 12:08
Quote:
Because this calls the functions directly, not browsing all the if-else or switch statements one by one, can this be faster than normal method?
Anw, have been using your older version of this, and I have to say, it's pretty much better and easier to manage than the normal way. Thanks for the nice includes, Emmet_. |
For example, having a lot of checks under one callback (in this case, OnDialogResponse) clutters the script and makes it look unorganized for most people, and that's more work for the script to process during runtime. It's similar in a way with scripts having many strcmp checks under one callback (OnPlayerCommandText), which is frowned upon by most scripters today.
I wanted to craft a script that had a similar layout to zcmd, not only for better organization, but to provide a more reliable and easier way for scripters to handle dialogs, rather than having them throwing code under one callback. Thanks for the feedback!
Quote:
The speed is too small to be effectively measurable so it is really irrelevant what is relevant is the ability to organize dialogs in their own functions which is beneficial design wise. I would use y_inline/y_dialogs myself but this method lives up to production quality standards and is good for both beginner and intermediate scripters alike.
|