Fallen Petal
Dialogue System
“OpenConversation” function
First, create the stack in the actor component base. Then get the reference of the stack.
After creating the stack, push the UI_Dialogue widget. Set the dialogue widget as a reference and set the Owning Dialogue Component to self. Then activate the widget so the player can control the UI.
After activating the widget, call the function “ProgressDialogue”. After that add the widget to the viewport and set input mode to UI only so that the player can control only UI not in the game, and also the show mouse cursor.
“ProgressDialogue” function
This function is to reset the dialogue index so make sure the dialogue start from the beginning. And will call out dialogue function.
“Dialogue” function
Dialogue function will happen in the children's class. The text and name will be added to the “AddDialogue” function. The option also will be passed in using an array.
So when the dialogue comes to an end, it will call out “ClearDialogueProgress” and “CloseConversation” functions.
“AddDialogue” function
Get the data from the “Dialogue” function and update it to the “UpdateDialogueText” function, and the index will increase so the dialogue can go to the next conversation.
“UpdateDialogueText” function
This function mainly updates the UI.
“ClearDialogueProgress” function
This function will clear the dialogue progress, to make sure the dialogue goes back to the beginning.
“RemoveDialogueProgress” function
This function is called to go back to a specific index of dialogue.
“CloseConversation” function
After all the dialogue happens, it will call this function. It will remove the dialogue widget.
Damage System (Health system, fire meter and shield)
”Heal” function
First will check if the actor is dead or if not then will heal a specific amount of health.
”RecoverShield” function
First will check if the actor is dead or if not then will recover a specific amount of shield.
Full “TakeDamage” function
When taking damage, it will first go through here to check whether the actor can be damaged or not.
“CanBeDamaged” Macro
If its block damage, it will call the OnBlocked event dispatcher.
If no damage then will just return nothing.
So if do damage, it will check the type of element damage first.
This will check if the actor has a fire meter.
This will check is the damage is caused more than the shield.
If yes, then will deduct the shield first, and then the rest amount of the damage will be deducted health.
If not, then will check is the shield available.
If the shield is available, it will deduct the shield, if not then deduct the health.
If receive water element damaged, it will check if the amount of damage is more than the fire meter.
If yes, then will deduct the fire meter first, and then the rest amount of the damage will be deducted health.
If not, it will check if the fire meter is available or not, if not available, then will deduct the fire meter.
After all the damage is calculated, it will check if the actor is dead or not.
If the actor is dead then will call out the OnDeath event dispatcher.
If not, it will check actor is interruptable or should force interrupt. Then will give a response to each type
Will check if it is on low hp or not, if yes then call the LowHp event dispatcher, and then will return the node.
User Interface
All UI was using Common UI plugin.
Main Menu
Include(Credits, Settings, Controls)
When entering the game, the actor will called and it will create the Main Menu stack (using the Common UI plugin)
After that, will activate the stack, and then push the main menu widget.
When pressing the New Game button, it will calling the loading screen stack.
After that, will activate the stack, and then push the loading widget.
Then will open the level.
When pressing other button, it will first get reference of the stack, then push widget.
Tutorial scene
Include(Movement, Skill, Attack, Enemy)
After the conversation / specific area, it will call out the tutorial stack.
Then will activate it, after that will push the specific widget.
Pause Menu
Include(Credits, Settings, Controls)
First will set game paused when pressing escape button. Then activate the pause menu stack that already created at the beginning.
After that push Pause Menu widget.
Settings
Include(Reset to last save, Confirm to save, and Back to last save)
When entering the seeting menu, first it will check that is there any saving exist.
If true, it will load the slot.
After that, it will get the data from the saved data, the set every data to the slider.
If no data was saved before, it will create a save actor, then set the value to default.
Health Bar delay effect
Include(Player Health Bar, Enemy Health Bar, Boss Fire Meter)
Defeat scene
Dialogue
Include (Multiple option)