====== How to make redeemable codes for your map ====== If you are a map creator who wants to make a Role-Playing Game (RPG) map, you might want to use the "Enter string to receive items, etc...." function. This function allows you to create an interface where players can enter a specific string to trigger certain events, such as receiving items, unlocking secrets, or activating quests. In this tutorial, I will show you how to use this function in your RPG map. ===== Designing ===== - You need to create a new UI and design it according to your preference. You can use the UI editor to add various elements, such as text, images, buttons, etc. Next, you need to create a new input box where players can enter the string. You can set the default text for the input box, such as "Input", but make sure that players can delete it and type their own string. {{:developer_center:developer_editor:enterstring_1.jpg?nolink&1920|}} - Create a new input box {{:developer_center:developer_editor:enterstring_2.jpg?nolink&1920|}} - Please input your contents (Example: "Input") - But when players input a string, they must delete your string {{:developer_center:developer_editor:enterstring_3.jpg?nolink&1920|}} ===== Required triggers ===== - Add this event: [When player enters any string] {{:developer_center:developer_editor:enterstring_4.jpg?nolink&1920|}} - Next, add a condition to determine what the string entered by the player is. You can use the condition editor to enter the string that you want to check. For example, if you want to check if the player entered "Hello", you can type "Hello" in the condition editor. You can also use variables, operators, and functions to create more complex conditions. {{:developer_center:developer_editor:enterstring_5.jpg?nolink&1920|}} - Please enter your string to be able to determine when the player input string into Input Box {{:developer_center:developer_editor:enterstring_6.jpg?nolink&1920|}} - Create a new homemade {{:developer_center:developer_editor:enterstring_7.jpg?nolink&1920|}} - Add homemade to the action to determine the time when the process of entering the string is 2 times or many times (Example: In my map, players can only enter the string once) {{:developer_center:developer_editor:enterstring_8.png?nolink&1920|}} - Now, add a control to limit the number of times that the player can enter the string and receive the item. You can use the control editor to add an "If... then ... otherwise" statement. For example, you can create a homemade variable to store the number of times that the player has entered the string, and compare it with a fixed value. If the variable is equal to zero, then the player can receive the item. If the variable is not equal to zero, then the player will see a floating notification that says "You have already received the item and you can't receive it again". * In the first, player inputs string => receive an item * In the second, player inputs string => floating notification "You received and you can't receive it" {{:developer_center:developer_editor:enterstring_9.png?nolink&1920|}} - Click to condition and compare the value with 0 or any number * If player's redeem value = 0 => player will receive special items * If player's redeem value ≠ 0 => yield floating notification {{:developer_center:developer_editor:enterstring_10.png?nolink&1920|}} - Add items and a notification (Example: "Add item to the player's backpack") {{:developer_center:developer_editor:enterstring_11.png?nolink&900|}}{{:developer_center:developer_editor:enterstring_12.png?nolink&900|}} - Display notifications in floating windows! (if it is otherwise) {{:developer_center:developer_editor:enterstring_14.png?nolink&1920|}} ---- If you have any questions about Developer Tools, feel free to join our official discord server [[https://discord.gg/NVRZHBChBt|Mini World Global DEV discord]]