I'm pretty sure I know the answer to this is going to be 'only functions from that library' but I really just want to confirm as that'll change my design plans quite a bit.
My question stems from I'm shifting all of a map's triggers/functions/actions etc to a library that I can but I still want one residing in the map that is used to configure the setup of many variables the rest of those functions rely upon, now I suppose since this action will live in the map and not the library it will need to call upon a bunch of functions from the library that edit these variables rather then it itself directly editing them, right?
ED: Well I got a chance to make some actions in the library that edited some variables and then called those actions by a trigger outside of the library in the map's own triggers and things are working like they should...so yah I think they can only be edited by functions in the same library.
So that's it, library variables are read-only unless being edited by an internal function. Makes sense.
Aye, it definitely makes sense just for this specific purpose it makes my life much more complicated then I thought it'd be :P I'm moving roughly 30+ variables and twice as many functions over to a library and the big caveat for me is the library lives in a module that the map uses as a dependency so is a whole whack of copy->close window->paste->find any glaring unlinked reference->save->load map again->check any glaring unlinked references->repeat :P
Got a fix for you there:
Shoot a Blizzard employee and send them mail that you'll continue if they don't fix it quick.
So far I found this fix to work pretty reliable.
I tried that before when I first discovered the woes of trying to do any sort of meaningful development within the library pane...all I got were 4chan party vans in the driveway :(
Well any globally declared non const variable can be modified across all files that include it, It is however absolutely horrible design to allow it but you could do it.
Use setters and handle errors.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I'm pretty sure I know the answer to this is going to be 'only functions from that library' but I really just want to confirm as that'll change my design plans quite a bit.
My question stems from I'm shifting all of a map's triggers/functions/actions etc to a library that I can but I still want one residing in the map that is used to configure the setup of many variables the rest of those functions rely upon, now I suppose since this action will live in the map and not the library it will need to call upon a bunch of functions from the library that edit these variables rather then it itself directly editing them, right?
ED: Well I got a chance to make some actions in the library that edited some variables and then called those actions by a trigger outside of the library in the map's own triggers and things are working like they should...so yah I think they can only be edited by functions in the same library.
So that's it, library variables are read-only unless being edited by an internal function. Makes sense.
Yep, this is pretty standard. You did already figure it out, but 'getter' and 'setter' functions inside the library are the way to go. :)
@alejrb: Go
Aye, it definitely makes sense just for this specific purpose it makes my life much more complicated then I thought it'd be :P I'm moving roughly 30+ variables and twice as many functions over to a library and the big caveat for me is the library lives in a module that the map uses as a dependency so is a whole whack of copy->close window->paste->find any glaring unlinked reference->save->load map again->check any glaring unlinked references->repeat :P
@BumpInTheNight: Go
Got a fix for you there: Shoot a Blizzard employee and send them mail that you'll continue if they don't fix it quick. So far I found this fix to work pretty reliable.
@s3rius: Go
I tried that before when I first discovered the woes of trying to do any sort of meaningful development within the library pane...all I got were 4chan party vans in the driveway :(
Well any globally declared non const variable can be modified across all files that include it, It is however absolutely horrible design to allow it but you could do it.
Use setters and handle errors.