Set Label
Category: Flow
An Event Content that places a "label" marker in the Event Content list. It is used as a destination when jumping to a specific position within an event via Move to Event, Add Choice, or Add Button.
This Event Content does nothing at runtime
Executing this Event Content causes no change to the screen or game state. Execution proceeds immediately to the next Event Content.
Its actual role is as a "pin (marker) indicating a position in the Event Content list". It is used by other Event Contents to find this label and jump to the corresponding position.
Property List
| Item (tscn label) | Input format | Description |
|---|---|---|
| Label | Text | The name of this label (identifier referenced by other Event Contents as a transition destination) |
Property Details
Label
Freely specify the name of this label as text. When another Event Content transitions via label specification, labels matching the name entered here are searched.
- Case-sensitive:
shopandShopare treated as different labels - Spaces and symbols are allowed: However, we recommend manageable naming
- Alphanumeric characters + underscores recommended: Formats like
shop_start,boss_defeated,loop_end
Recommended label naming
- Short English words indicating purpose + underscore separator:
shop_entry,game_over,tutorial_end - Loop head:
loop_start - Branch merge point:
branch_end/end - Dedicated event entry:
boss_fight,treasure_room
Runtime Behavior
This Event Content is very simple:
1. Does nothing
At runtime, neither the screen nor game state changes; execution proceeds immediately to the next Event Content.
2. Functions as transition destination from other Event Contents
When you specify a label name in the Label property of Move to Event, Add Choice, or Add Button, this Event Content is searched from the top of the Event Content list in order, and execution begins from the line immediately after the matching label.
3. Label search rules
- First label found: Execution starts from the immediately following line
- Not found: Jumps to the end of the event (
*** WARNING : <label name> : Label was not found.log output) - When the same label name appears multiple times: The one closer to the top of the Event Content list is prioritized (the 2nd and later are effectively ignored)
Typical Usage Flows
Flow 1: Merge point for conditional branches
Merge point for if-else-like processing:
- Move to Event (Determine
{flag} == 1, Event empty, Labeltrue_branch) - (Processing when false)
- Move to Event (Event empty, Label
end) ← Unconditionally jump to end to skip true_branch - Set Label (this Event Content) (Label
true_branch) - (Processing when true)
- Set Label (this Event Content) (Label
end) ← Branch merge point - (Subsequent common processing)
Flow 2: Loop head
Head marker for repeat processing:
- Set Label (this Event Content) (Label
loop_start) - (Processing in the loop)
- Assign Variable (count+1)
- Move to Event (Determine
{count} < 10, Labelloop_start) ← Return to loop head if condition is met
Flow 3: Branch destinations for choices
Define labels corresponding to each choice with Add Choice:
- Add Choice (text "Inn", Event empty, Label
inn) - Add Choice (text "Weapon Shop", Event empty, Label
weapon) - Add Choice (text "Item Shop", Event empty, Label
item) - Show Selection Window
- Set Label (this Event Content) (Label
inn) - (Inn processing)
- Move to Event (Label
end) - Set Label (this Event Content) (Label
weapon) - (Weapon shop processing)
- Move to Event (Label
end) - Set Label (this Event Content) (Label
item) - (Item shop processing)
- Set Label (this Event Content) (Label
end)
Flow 4: Entry to external event (intermediate point of another event)
Jump into the middle of this event from another event:
- (Event head)
- Show Text ← "This event begins here"
- Set Label (this Event Content) (Label
shop_entry) - Show Text ← "Shop processing starts here"
When transitioning from another event with Move to Event (Event same event name, Label shop_entry), step 2 is skipped and execution starts from step 4.
Flow 5: Branch destinations for multiple buttons
Label transitions for Add Button:
- Add Button (text "Attack", Event empty, Label
attack) - Add Button (text "Defend", Event empty, Label
defend) - Show Buttons
- Set Label (this Event Content) (Label
attack) - (Attack processing)
- Move to Event (Label
end) - Set Label (this Event Content) (Label
defend) - (Defend processing)
- Set Label (this Event Content) (Label
end)
Flow 6: Early termination jump
Skip processing and jump to event end when condition is met:
- Move to Event (Determine
{quest_done} == 1, Labelend) - (Processing when quest incomplete)
- Set Label (this Event Content) (Label
end) - (Common end processing)
Typical Combinations
For the overall picture, see Combination Patterns Collection.
Branch + merge pattern
Branch via Move to Event, merge via this Event Content:
- Move to Event (condition, Label
A) - (B processing)
- Move to Event (Label
end) - Set Label (this Event Content) (Label
A) - (A processing)
- Set Label (this Event Content) (Label
end)
Loop pattern
While-like with this Event Content and Move to Event:
- Set Label (this Event Content) (Label
loop_start) - (In-loop processing)
- Move to Event (condition, Label
loop_start)
Branching from choices
Place this Event Content per result selected via Add Choice / Add Button:
- Add Choice × N (each with Label specified)
- Show Selection Window
- Set Label (this Event Content) (Label 1), processing, jump to end
- Set Label (this Event Content) (Label 2), processing, jump to end
- Set Label (this Event Content) (end) ← All branches merge
Entry from another event
Enter the same event at a different location from outside:
- Place Set Label (this Event Content) (Label
later_half) near the end of Event A - From Event B, use Move to Event (Event
Event A, Labellater_half) to start execution from the latter half
Related Event Contents
| Related Event Content | Purpose |
|---|---|
| Move to Event | The main one that references this Event Content as a transition destination |
| Add Choice | References this Event Content as a transition destination based on selection result |
| Add Button | References this Event Content as a transition destination on button click |
| Return to Last Event | Returns to the original event (does not use this Event Content) |
Related Pages
| Page | Related Content |
|---|---|
| Event Content List | List of all Event Contents |
Notes
Does nothing at runtime
Executing this Event Content does not change the game state. Execution proceeds immediately to the next Event Content. It is a "static marker" used as a jump destination by other Event Contents.
Avoid defining the same label name multiple times
If you define the same label name multiple times within the same event, only the one closer to the top of the Event Content list is used. The 2nd and later are effectively ignored, so you may not get the intended behavior. Make label names unique.
Case-sensitive
Label names are judged by exact match. shop_entry and Shop_Entry are treated as different, so when specifying labels in Move to Event, etc., match the spelling (including case).
Blank labels are effectively invalid
You can save with Label blank, but you cannot specify a blank label from other Event Contents (since specifying blank Label in Move to Event means "event head"). Set Label with blank Label is effectively non-functional.
Can be placed anywhere in the event
This Event Content can be placed anywhere in the event. At the head, in the middle, or at the end, it functions as a jump destination.
Labels in other events can also be referenced
By combining Event + Label in Move to Event, you can also transition to a specific label point in another event. This Event Content functions as a transition destination regardless of which event it is placed in, as long as the containing event is being executed.
Naming recommendations
Users need to self-manage naming rules. Here are recommended namings:
- Short English words indicating purpose + underscore separator (
shop_entry,game_over) - Loop head (
loop_start), branch merge point (endorbranch_end) - Event entry (
boss_fight,treasure_room)
