NPC_Witch - Hawthorn-Games/ProjectScrapped GitHub Wiki

Variables

Witch contains the same Variables as base NPC. The following listed are extensions to her functionality.

Type Name Description
-int DialogueIndex Controller for choosing dialogue from structure
-int Location Index controller for determining at which Location (based on Witch_Positions_Array) is at
-WitchLocationsRef Witch_Positions_Array Array of
-MaterialInstance HeadEL4 Material Instance Reference to Dissolve material Head
-MaterialInstance SkirtEL0 Material Instance Reference to Dissolve material Skirt
-MaterialInstance HatEL1 Material Instance Reference to Dissolve material Hat
-MaterialInstance NecklaceEL2 Material Instance Reference to Dissolve material Necklace
-MaterialInstance SkinEL3 Material Instance Reference to Dissolve material Skin
-bool FinishedWaiting Flow control during witch dissolve sequence
-bool CustomLocation Flow control - used to skip sequential functionality of Witch moving to next location in the Index
-Int CurrentPuzzle Index pointer as to which puzzle the witch is at to enable respective dialogue
-bool BlockingRDissolved Check whether Blocking Rubble in tutorial has dissolved

Functions

BeforeCompletionDialogue()

Parsing parameters/values for 'before win' to the MainUI_Dialogue Widget during run time to be displayed while in dialogue sequence. This function will be called if the NPC is not assigned to any puzzle manager.

AfterCompletionDialogue()

Parsing parameters/values for 'before win' to the MainUI_Dialogue Widget during run time to be displayed while in dialogue sequence. This function will be called if the NPC is not assigned to any puzzle manager.

CreateDynamicMaterials()

Called on EventBeginPlay to reference/assign dissolve material instances into the respective variables.

TZBlockCheck()

Checking whether Blocking rubble has been destroyed in the scene.

SetDynamicMaterials()

Assigning dissolve materials to the WitchMesh.

ResetMaterialsDefault()

Resetting the Witch's materials back to her default textures after dissolve sequence is complete.

Custom Events

DisableTab()

Casts to TopDownController Class and disables TAB during dialogue. This custom event is called when dialogue is engaged.

InteractCooldown()

Called by MainUI_Dialogue widget script once dialogue sequence is complete to stop player from engaging dialogue to quickly after completion.

PhaseIn()

Using a timeline, the event increases the scalar parameter of each dynamic material to create a ''Phase In'' effect.

PhaseOut()

Using a timeline, the event Decreases the scalar parameter of each dynamic material to create a ''Phase Out'' effect. Once finished, The witch materials are reset to her default textures to prevent graphical glitches.