====== Rest Area ====== **Idea: This feature can be used for RPG Map or other types** ====Finished product==== {{ :developer_center:developer_editor:finished_product_rest_area.mp4?nolink&800 |}} ==== Creating area ==== {{ :developer_center:developer_editor:rest_area.mp4?nolink&800 |}} ====Trigger==== **Step 1** - To active a trigger, we need an event to identify and trigger the action {{:developer_center:developer_editor:screenshot-20240717-220701.png?nolink&1500|}} **Step 2** - After create the event, we are going to identify the rest area {{ :developer_center:developer_editor:identify_area.mp4?800 |}} **Step 3** - Create a boolean value to identify when the player enters or leaves the rest area. We will have two values is **//true//** and **//false//**.You can also use the value variable. You will create two variables and set two different values for them (example: 1 and 2, 0 and 1,etc.) then, it will have the same usage as boolean value. {{ :developer_center:developer_editor:rest_area_3.mp4?800 |}} **Step 4** - As mentioned above, we have two values: //true// and //false//. We will check whether the value is //true//. If it is //true//, we will add health or other items for the player {{:developer_center:developer_editor:set_boolean_variable.png?nolink|}} {{:developer_center:developer_editor:set_boolean_variable2.png?nolink|}} Then, we will going to add //repeat … until// statement, we will level up the HP until the player leaves rest area. But if player's HP greater than or equal to player's max HP, we won't upgrade {{:developer_center:developer_editor:statement_repeat_until.png?nolink|}} {{:developer_center:developer_editor:condition.png?nolink|}} {{:developer_center:developer_editor:screenshot_1721281901.png?nolink|}} {{:developer_center:developer_editor:screenshot_1721281960.png?nolink|}} Now, we will check the player's HP to see whether they level up or not {{:developer_center:developer_editor:rest_area_4.png?nolink|}} {{:developer_center:developer_editor:rest_area_5.png?nolink|}} If it can satisfy all the conditions, the action will be triggered {{:developer_center:developer_editor:rest_area_6.png?nolink|}} {{:developer_center:developer_editor:untitled.png?nolink|}} And we need to make the loop breaks in **1** second. (Or you can change the time following your map) {{:developer_center:developer_editor:rest_area.png?nolink|}} **Step 5 ** - We will do the remaining case: the player leaves rest area {{:developer_center:developer_editor:rest_area_8.png?nolink|}} **Step 6** - Causes boolean value will be //false// {{:developer_center:developer_editor:rest_area_9.png?nolink|}} **Step 7** - Full of triggers. This is the official trigger! {{:developer_center:developer_editor:screenshot_1721283780.png?nolink|}} ---- 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]]