Game Dev Diary: Day 6
I didn't get very far in the tutorial today, not because I was slow or distracted, but because I took a deep dive into the material I was learning. I was Googling stuff, I was reading Wiki's, I think I reached stack overflow levels at some point. It was pretty intense.
I think I have a handle on it now. Mind you, this only took like an hour because I don't have a lot of time in my day, but it was a pretty productive hour. So, the first thing I learned was about making custom functions callable from Blueprints so that the designers can access them and screw around with it, do what designers do. Yada yada. I do like being able to control what the designer can do, though. It's like having parental controls in Unreal. I could make a actor string property that just says, "Delete this please" and make it read only to mess with them. Anyway, I'm off topic. You can create custom functions that can be called with Blueprints by adding the UFUNCTION() macro the line before the declaration of the function. Handy stuff. I also learned about overriding functions, which I did not know much about before. I had heard it mentioned plenty of times in school, but never really needed it. So when my teachers were talking about it in class, I just nodded my head like I understood. I didn't.
This is where the Googling and Wikipedia-ing came into play. I did some research and found out that overriding functions deals with inheritance. With inheritance, you can have a parent class and a child class that both have a function with the same name. The way I understand it is that when you call the function with that name, the child class's function automatically overrides the parent class's function and the child class's function is used. You can get around this by calling the parent class's function within the child class's function using the '::' operator. Like I said, I didn't get through much, yet I learned a lot. Hopefully I will make a little more progress on Friday, but the tutorial said that things will only go deeper from here. This worries me. Wish me luck.
Leave a Reply.