AGS Pointers for Dummies: Difference between revisions

Line 208: Line 208:
That would make PARAM2 optional, with the default value of 5. This import doesn't necessarily have to be placed in a script header (which is where most of your imports will be). If you don't want the function to be globally accessible but you want an optional parameter, you can just put this import in your script before you define the function and it will allow you to have a non-global function with an optional parameter.
That would make PARAM2 optional, with the default value of 5. This import doesn't necessarily have to be placed in a script header (which is where most of your imports will be). If you don't want the function to be globally accessible but you want an optional parameter, you can just put this import in your script before you define the function and it will allow you to have a non-global function with an optional parameter.


=====Optional ''Pointer'' Parameters=====
''Okay, that's nice, but how does it apply to pointers? I tried assigning my Character* parameter a default value and it didn't work.''
''Okay, that's nice, but how does it apply to pointers? I tried assigning my Character* parameter a default value and it didn't work.''


Anonymous user