Intro to 3D Game Development

0 of 193 lessons complete (0%)

Scripting Part 2: Making Code Respond to Players

Info: Function Parameters

You don’t have access to this lesson
Please register or sign in to access the course content.

Parameters are a way to give an input in your function that might change how it works. They act like the let variables that we have defined inside the function (you can’t access them outside the function), but you can choose what value you want to give them when you call the function.




In this case, we’ll use either “open” or “close” and make the function do different things, and we’ll be able to specify which one we want even from a different script!