Loony Lips in GodotWe are going to make a word game called Loony lips. Loony lips are based on the old party game Mad Lips. If we are not played, we have a series of prompts on a card, and we ask you to fill those prompts. Then we will put those prompts into a story and read the story we have made without knowing what the story is going to be. For example, We might say we have a name, God. We have a place Temple and have the year 1987 and a feeling, and then we can say that to make a story or paragraph with a mean: Once upon a time, there was a little rock named God who lived in an appalling Temple. He had dreamed of leaving the Temple ever since 1987. We can put in the words and put them into that story. We have to work with variable, constant, arrays, strings, and many more concepts. The array is a special kind of variable and contains a group of elements. Typically these are the same type data type, such as an integer or string. Array making our game more scalable. So firstly, we have to create an array of all plug-in words that we mean by plugin words into the array. Plugs are the words in which the player is picked. Create a new project:Creating a new project with the name Loony lips. After creating the project, we have to create a User interface script. Click on User Interface. If we want to change the name, then we can double click on the control to rename and then click on the blue plus (+) sign to create a script file. Then the dialog box open here where we change the built-in script "Default" to "No comments" and then create the script. And then the below prompt open. We are going to write a simple story to print here: If we write the below code in the script block, we get the below output. Output: Prompt is used to handle array here, and %s is, in short, a string: Code: Output: A bug like if we add more strings and not use the same number of %s in the story, then it will occur a bug, so use the same number of the string in both. Then the below bug occurs. Because we write three String in the array but use only two string in the story, then it will create a bug. We can also make a more significant story using the array. We can also use two array string in the same story paragraph like below by using two Prompts. Output: In the next tutorial we understand about Label. Next TopicLabel in Godot |