-
Notifications
You must be signed in to change notification settings - Fork 0
Conditions
Dagait edited this page Apr 18, 2022
·
7 revisions
To create a new condition, simply perform a right mouse button click in the project view in Unity-Engine. The default folder for all conditions is:
Asstes/Objects/Quests/[Quest_name_folder]/Conditions/...
In the menu go to:
- Right Mouse button --> Create --> HamsterGame --> Quest --> Condition
The default name for a newly created item is "new Condition", change this name to whatever name you want. Subsequently, click on the newly created condition file, as a result, the inspector should look like this:
Explanation of the properties:
Name | Datatype | Description |
---|---|---|
PickUpAllGrains | bool | The hamsters' have to pick up all grains. |
NeedSpecificAmountOfGrains | bool | Should there be a specific amount of grains on each tile? |
SpecificAmountOfGrains | int | Define the specific amount of grains (bool above). |
HasLimitedEndurance | bool | Should the hamsters' have a limited amount of steps (endurance points)? |
MaxEndurancePoints | int | Define the max endurance points the hamsters' have. |
DisplayEndurance | bool | Display the endurance points in-game? |
FindExit | bool | Hamsters' needs to reach a specific tile? |
NeedToFindExit | bool |
true => Be able to assign the "ExitTransform" |
ExitTransform | Transform | Assign the "exit trigger transform" to it. |
OnAddGrain() | UnityEvent | What should happen if a hamster received one or more grains? |
OnRemoveGrain() | UnityEvent | What should happen, if a hamster drops one or more grains? |
OnMove() | UnityEvent | What should happen if a hamster moves? |
After you set up everything you wanted, you have to add the condition to the correct quest, see Quests chapter.