Just wanted to point out something to remember when working with function parameters and objects for newer people, because I sometimes still trip myself up on it even though I’m more comfortable with functions now.
Your object parameter can have a different name than the actual object on a scene.
I know it’s probably a better practice to call it the same thing, to avoid confusion. But it happens. Sometimes I think of a simpler name later and don’t want to rename the actual object, especially if it is in use by other functions and would be time consuming to change everything since objects in extensions aren’t automatically renamed (which I like for some situations).
The main thing to remember in this case is that the events inside the function need to reference the object by its parameter name, not its scene name. When you add the function to your scene or external event sheet, you can then select the associated object from your scene for that parameter.
If you don’t know this and used different names in the ‘wrong’ places, you might think the function is broken or wonder why it isn’t working as expected.