Overview
This page provides complete, production-ready examples showing how to implement common game systems using the World Activity System. Each example includes setup instructions, GC2 instructions, and testing steps.
Tip: Copy these examples and adapt them to your game's needs. All examples use only GC2 visual scripting - no coding required!
Example 1: Ancient Shrine Discovery
A discoverable shrine that heals the player and grants a temporary buff.
Setup
- Create SpatialActivity asset: "Ancient Shrine"
- Set Category: Shrine
- Set Requires Discovery: ✓ Checked
- Create anchor in scene at shrine location
- Set trigger radius: 5 units
On Activate Instructions
1. Heal Player
└─ Target: Player
└─ Stat: Health
└─ Operation: Set to Maximum
2. Add Status Effect
└─ Target: Player
└─ Effect: "Shrine Blessing"
└─ Duration: 300 seconds (5 minutes)
3. Modify Stats (Temporary)
└─ Target: Player
└─ Stat: Health Regen
└─ Operation: Add
└─ Value: +5
└─ Duration: 300 seconds
4. Play Visual Effect
└─ Prefab: [Healing Particles]
└─ Position: Player
└─ Duration: 3 seconds
5. Play Audio
└─ Audio Clip: shrine_blessing.wav
└─ Volume: 0.7
6. Show UI Message
└─ Message: "You have been blessed by the Ancient Shrine"
└─ Duration: 3 seconds
└─ Type: Success✅ Expected Result
Player walks near shrine → Discovery triggered → Health fully restored → Blessing buff applied for 5 minutes → Particles and sound play → UI message appears
Example 2: Quest Objective Tracking
Track quest progress by discovering specific locations. Award quest completion when all found.
Setup (3 Shrines)
Create 3 SpatialActivity assets for quest "Find the Three Shrines":
- Shrine of Fire
- Shrine of Water
- Shrine of Earth
On Activate (Each Shrine)
1. Increment Variable
└─ Variable: [ShrinesFound]
└─ Operation: Add
└─ Value: 1
2. Show Message
└─ Message: "Shrine discovered! ({ShrinesFound}/3)"
3. Check Quest Completion
└─ Condition: If [ShrinesFound] >= 3
└─ Complete Quest: "Find the Three Shrines"
└─ Award Experience: 500 XP
└─ Show Message: "Quest Complete!"
└─ Play Audio: quest_complete.wavExample 3: Traveling Merchant Spawn
Merchant spawns automatically every 10 minutes, stays for 5 minutes, then disappears.
Setup
- Create TemporalActivity: "Merchant Spawn"
- Trigger Type: Interval
- Interval: 600 seconds (10 minutes)
- Duration: 300 seconds (5 minutes)
- Priority: 0.5
- Enable Scheduler on WorldActivityManager
On Activate
1. Spawn Merchant NPC
└─ Prefab: [Merchant Character]
└─ Position: [Merchant Spawn Point]
└─ Store Reference: [CurrentMerchant]
2. Play Arrival Effects
└─ VFX: [Portal Effect]
└─ Audio: merchant_arrival.wav
3. Broadcast Message
└─ Message: "A traveling merchant has arrived in town!"
└─ Range: Global
└─ Duration: 5 seconds
4. Set Quest Marker
└─ Target: [CurrentMerchant]
└─ Icon: [Merchant Icon]
└─ Show on Map: YesOn Complete (After 5 Minutes)
1. Play Departure Effects
└─ VFX: [Portal Effect]
└─ Audio: merchant_departure.wav
2. Destroy Merchant
└─ Target: [CurrentMerchant]
└─ Delay: 2 seconds (after portal effect)
3. Clear Quest Marker
└─ Remove Marker: [Merchant Icon]
4. Show Message
└─ Message: "The merchant has departed."
└─ Duration: 3 secondsExample 4: Achievement System
Unlock achievement when player reaches level 10 with 100 enemies defeated.
Setup
- Create TemporalActivity: "Warrior Achievement"
- Trigger Type: Conditional
- Conditional Behavior: OneShot (triggers once only)
- Priority: 0.7
Prerequisites
Conditions (ALL must be true):
1. Player Level >= 10
2. Variable [EnemiesDefeated] >= 100
3. Variable [WarriorAchievement] = falseOn Activate
1. Set Achievement Flag
└─ Variable: [WarriorAchievement]
└─ Value: true
2. Award Rewards
└─ Add Skill Points: 5
└─ Add Gold: 1000
└─ Unlock Title: "Warrior"
3. Play Achievement Animation
└─ UI: [Achievement Popup]
└─ Title: "Warrior"
└─ Description: "Reach level 10 and defeat 100 enemies"
└─ Icon: [Warrior Badge]
└─ Duration: 5 seconds
4. Play Audio/VFX
└─ Audio: achievement_unlock.wav
└─ VFX: [Gold Sparkles]
5. Save Achievement
└─ Update Player Profile
└─ Sync to Cloud (if online)
// Event automatically disables (OneShot behavior)Example 5: Blood Moon Event
Dangerous night event that triggers randomly, spawning stronger enemies and offering better loot.
Setup
- Create TemporalActivity: "Blood Moon"
- Trigger Type: TimeOfDay
- Time of Day: Midnight
- Days Between: 3-7 (random)
- Duration: 480 seconds (8 minutes)
- Priority: 0.9 (high priority)
Prerequisites (20% Chance)
Condition:
└─ Random Chance: 20%
(Only 1 in 5 midnights triggers event)On Activate
1. Change Sky
└─ Skybox: [Blood Moon Skybox]
└─ Lighting: Red tint, darker
2. Broadcast Warning
└─ Message: "🩸 The Blood Moon rises! Danger approaches..."
└─ Range: Global
└─ Duration: 5 seconds
└─ Color: Red
3. Spawn Elite Enemies
└─ For Each Spawn Point (10 total):
└─ Spawn: [Elite Enemy]
└─ Difficulty: +50%
└─ Loot: +100% quality
4. Apply Global Buffs
└─ All Enemies: +30% Health, +20% Damage
└─ Players: Show warning UI, enable combat music
5. Enable Special Loot
└─ Set Variable: [BloodMoonActive] = true
└─ (Used by loot system for rare drops)On Complete
1. Restore Sky
└─ Skybox: [Normal Night]
└─ Lighting: Normal
2. Cleanup Enemies
└─ For Each: Remaining Elite Enemies
└─ Play Death Effect
└─ Destroy GameObject
3. Show Results
└─ Message: "The Blood Moon has passed. You survived!"
└─ Duration: 5 seconds
4. Award Survival Bonus
└─ If Player Alive:
└─ Award Experience: 1000 XP
└─ Award Gold: 500
5. Disable Special Loot
└─ Set Variable: [BloodMoonActive] = falseExample 6: Weekly World Boss
Powerful boss spawns every Sunday at noon, available for 2 hours.
Setup
- Create TemporalActivity: "Ancient Dragon"
- Trigger Type: TimeOfDay
- Time of Day: Noon
- Days Between: 7 (weekly)
- Duration: 7200 seconds (2 hours)
- Priority: 1.0 (highest)
Prerequisites
Condition:
└─ Day of Week = Sunday
(Ensures boss only spawns on Sundays)On Activate
1. Spawn Boss
└─ Prefab: [Ancient Dragon]
└─ Position: [Boss Arena]
└─ Store Reference: [CurrentBoss]
2. Global Announcement
└─ Message: "⚔️ The Ancient Dragon has awakened!"
└─ Range: Entire Server
└─ Duration: 10 seconds
└─ Sound: boss_roar.wav
3. Set Quest Marker
└─ Target: [Boss Arena]
└─ Icon: [Dragon Icon]
└─ Show on Map: Yes
└─ Visible Range: Unlimited
4. Enable Arena
└─ Activate: [Boss Arena Barriers]
└─ Spawn: [Teleport Portals] (3 locations)
5. Start Boss Music
└─ Music: epic_boss_theme.mp3
└─ Loop: trueOn Complete or Boss Death
1. Check If Boss Defeated
└─ If Boss Health <= 0:
└─ Award Loot Chest
└─ Grant Achievement: "Dragon Slayer"
└─ Announce: "The Ancient Dragon has been defeated!"
└─ Else (Time Expired):
└─ Play Escape Animation
└─ Announce: "The Ancient Dragon has escaped!"
2. Cleanup
└─ Remove: [Boss GameObject]
└─ Deactivate: [Arena Barriers]
└─ Destroy: [Teleport Portals]
3. Stop Boss Music
└─ Fade Out: 3 seconds
└─ Return to Normal MusicExample 7: Daily Quest Reset
Reset all daily quests at midnight, allowing players to complete them again.
Setup
- Create TemporalActivity: "Daily Reset"
- Trigger Type: TimeOfDay
- Time of Day: Midnight
- Days Between: 1 (daily)
- Duration: 1 second (instant)
- Priority: 0.8
On Activate
1. Reset Daily Variables
└─ Set Variable: [DailyQuestsCompleted] = 0
└─ Set Variable: [DailyBossKills] = 0
└─ Set Variable: [DailyResourcesGathered] = 0
2. Reset Quest States
└─ For Each Quest in [DailyQuestList]:
└─ Reset Quest Progress
└─ Reset Quest State to "Available"
└─ Reset Objectives
3. Refresh Quest Board
└─ Update UI: [Quest Board]
└─ Regenerate: Random Daily Quests (if applicable)
4. Award Login Bonus
└─ If Player Online:
└─ Show Message: "New day! Daily quests reset."
└─ Award: Daily Login Reward
└─ Increment: [LoginStreak]
5. Log Event
└─ Debug Log: "Daily reset completed"
└─ Save Player Data✅ Testing Tips
Use Debug Window → Tools tab → Time Simulation → "Advance 24 Hours" to test daily reset without waiting. Verify all quests reset correctly.