- Sep 20, 2006
- 91
- 10
- 54
Hello,
I'm trying to script a simple quest which involves some multiple #IFs at some point. As I'm "obsessed" about code reusability, I can re-use large blocks of script but for this I need to make some checkings into a function and depending of the input value I set some global variables' values.
I want to ask if it's possible to avoid a long list of #IFs...maybe using arrays or sort of well known SWITCH? Other solution I was thinking about is to have a little table into Game3G where I keep the input value as primary key and the values for needed global variables as the other fields of that table.
Anyone having some other ideas?
Please keep in mind I'm a newbie when it comes about LOM3 scripting (but I learn fast :P)
Thanks in advance!
I'm trying to script a simple quest which involves some multiple #IFs at some point. As I'm "obsessed" about code reusability, I can re-use large blocks of script but for this I need to make some checkings into a function and depending of the input value I set some global variables' values.
I want to ask if it's possible to avoid a long list of #IFs...maybe using arrays or sort of well known SWITCH? Other solution I was thinking about is to have a little table into Game3G where I keep the input value as primary key and the values for needed global variables as the other fields of that table.
Anyone having some other ideas?
Please keep in mind I'm a newbie when it comes about LOM3 scripting (but I learn fast :P)
Thanks in advance!