Game Development for Kids with Godot Engine - Parameterized Function in GDScript

avatar

In this post we are going to take a look at How to write Parameterized Function in GDScript using Godot Engine.

In previous tutorial I posted about how to make use of the conditional logic in the Godot Engine GDScript. Like python, it was easy to implement and also something I'd recommend you to check out if you want to code the conditional logic the next time you decide to write the gdscript.

I skipped the normal function tutorial. Which I may cover in near future but as of now let's take a look at how we can create the parameterized function and how we can get it to work. So it's better to see how the function can be used in various ways in the game.

This is the 9th tutorial in the series, I have created the table of contents for the previous set of the tutorials. So you may want to check it out. also do take a look at the some of the other videos in the list. I am sure you would find it useful for learning some new and old concepts.



So let's get started with below video and you can check the TOC below if you want to access the previous tutorials.


Table of Contents of Godot Engine Tutorials



Now check out the Video tutorial below in order to Create Parameterized Function in GDScript for your game project.



This video above shows you how you can add the parameters to your function. And by passing the values you get the function to do specific set of the things. You can see that if you master how to use the functions properly you can easily manage your code and also get repeat work done as well. I hope you learned the concepts through this small video. I'd love to see your comments.

If you want to try out the similar game development tutorials using the gdevelop, you can follow this tutorial trail of GDevelop Tutorials.

I hope the current tutorial was useful to you.

We will continue the further game development topic in next post.



0
0
0.000
4 comments
avatar

I am learning how make games with godot hahaha

0
0
0.000
avatar

Congratulations @devpress! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s):

You distributed more than 1250 upvotes.
Your next target is to reach 1500 upvotes.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Check out the last post from @hivebuzz:

The new HiveFest⁶ attendee badge is waiting for you
Feedback from the November 1st Hive Power Up Day
Support the HiveBuzz project. Vote for our proposal!
0
0
0.000