Creation Tips - Event Setting
#Content Editor
Last updated
#Content Editor
Last updated
Achieving the effect of "multiple interactions, where each click/drag on different layers triggers the same or different feedback." Here are some examples:
Example 1: After clicking and finding 5 target items, redirect to the app store.
Example 2: After successfully dragging all 3 puzzle pieces to the correct positions, a "Next Level" button appears as an indication.
Example 3: For each group of elements eliminated, the progress bar advances, and after completing 3 groups of eliminations, redirect to the next scene.
... ...
We will use the template "Find Items" as an example to create a simplified version and focus on explaining how to achieve this type of gameplay using Global Variables.
Simplified Version Gameplay Process:
Click on the screen to find cats.
Each time a cat is found, play a star particle feedback and increment the count of found cats.
After finding three cats in total, redirect to the end page.
Creating this type of gameplay requires three steps: adding a numeric variableγassigning the value to each elementγand adding Conditions to calculate interaction counts.
Click on [Global Variables] - [Add variables]
Enter the variable name (such as click times)
Select variable type as [Value]
Set the initial value to 0οΌAt the initial screen, the player has not yet clicked.οΌ
Save
Select the layer [cat1] - [Add Event] - [Press]
[Add response event] - [Assign the value]: clicktimes+1 (i.e. press a cat and the number of clicks will increase by 1)
Continue to add response events - [Show layer] cat1 - [Hide layer] star1
After adding, we click the [Copy] button to copy the entire event
Then paste them into layers [cat2] and [cat3] in sequence, and change the corresponding effective layers to cat2/star2, cat3/star3
Click on [Event] in the current scene - [Add Event] - Select [Condition] - [+Condition]
[Add condition 1] : clicktimes=Value 1, and check [Valid only once]οΌWhen the interaction count equals 1.οΌ
[Add response event] - [Show layer] text_1 - [Hide layer] text_0
Similarly, continue to add two conditions: clicktimes=2οΌWhen the interaction count equals 2.οΌγclicktimes=3οΌWhen the interaction count equals 3.οΌ
And sequentially add response events: Show text_2&Hide Text_1γShow text_3&Hide Text_2
Note: Because we want to achieve "redirect the end page after finding three cats", we need to add an additional response event - Redirect to the next scene in Condition 3 (i.e. when the number of clicks=3) (execution delay of 0.5 seconds is the reserved particle playback time)
With these steps, the event setup is complete. When you encounter a need to "calculate the interaction count on different layers to trigger specific feedback," you can try applying this logic and method in your own projects!
Achieving the effect of "multiple interactions, where each click/drag on the same layer triggers the same or different feedback." Here are some examples:
Example 1: On the first click on the wheel, it stops at position A. On the second click, it continues from position A and stops at position B.
Example 2: Clicking the "Generate" button results in the appearance of a new character with each click.
Example 3: Clicking an item produces the same particle effect or other feedback with each click.
... ...
Gameplay Process of This Case:
The initial state has the wheel stopped at the red position.
On the player's first press, the wheel rotates to the purple position and stops.
On the player's second press, the wheel continues rotating from the purple position and stops at the cyan position.
Creating this type of gameplay requires 2 steps: aadding a numeric variableγadding Conditions and assigning the value to the layer events.
Click on [Global Variables] - [Add variables]
Enter the variable name (e.g., tap).
Select variable type as [Value]
Set the initial value to 0οΌAt the initial screen, the player has not yet clicked.οΌ
Save
Select the layer that will be clicked - "Add Event" - "Press."
Add Condition 1: tap = 0 (indicating the interaction count is 0).
Add response event "Assign the value": assign the value "tap+1" (incrementing the interaction count to 1).
Add other response events: play the rotation animation 1 of the wheel, play feedback sound effects once, etc.
Add Condition 2: tap = 1 (indicating the interaction count is 1).
Add response event "Assign the value": assign the value "tap+1" (incrementing the interaction count to 2).
Add other response eventsοΌplay the rotation animation 2 of the wheel, play feedback sound effects once, etc.
Similarly, if you want to handle the player's third click, fourth click, and so on, you can set tap = 2, tap = 3, and so on.
The parameters for the rotation animation of the wheel are as follows
With these steps, the event setup is complete. When you encounter a need to "calculate the interaction count on same layers to trigger specific feedback," you can try applying this logic and method in your own projects!
The initial screen includes a countdown timer.
When the player has no action or fails to achieve a specific goal within the set time, trigger the countdown and proceed to Ending A.
When the player successfully interacts or achieves the specific goal within the set time, cancel the countdown and proceed to Ending B.
Gameplay Process of This Case:
Upon entering the trial, displaying core gameplay and the countdown timer.
If the player completes the drawing within 10 seconds, redirect to the victory page.
If the player fails to complete the drawing within 10 seconds, redirect to the product information page.
To set up a complete countdown timer, follow these 2 steps: triggering the countdown and canceling the countdown.
1οΌAfter adding the countdown asset, set the countdown sequence as "Playback Interval: 1000ms" and "Automatically Play Once on Entry."
2οΌIn the core gameplay scene, Add Event - "Timing trigger."
3οΌSet the execution delay of N seconds to trigger the failure result (e.g., redirect to Scene 3 after 10 seconds).
In the event for successful interaction, add response event "Cancel execution delay".
Select the timer ID set in the previous step (e.g., after completing the drawing, redirect to Scene 2 and cancel the timer "timer_1").
Tip: There are multiple countdown presets available in "Presets Library" for your convenience! Presets Library
In the Asset Library - Particle, add any particle effect. Only one particle effect is needed.
In the [Particle Thumbnail] section, replace the particle image with an error feedback image, such as "Γ".
Adjust the particle parameters according to the values in the image below.
Select multiple layers (particle, draggable image, etc.) to group them together, and then hide the particle layer.
Add a Trigger event to the drag group - Not dragged to target position, and set the drag area.
Add response events: Display particle effect. Play the error sound effect once from the start.