using /Fortnite.com/Devices # Our blueprint for the Spooky Trap spooky_trap := class(device): # Variable: Stores the reference to the Post Process device # We will link this in the editor by name or reference post_process_device: PostProcessDevice = PostProcessDevice{} # Variable: Stores the reference to the Trigger Volume trigger_volume: TriggerVolume = TriggerVolume{} # When the island starts... OnBegin(): void= # Wait a frame to ensure devices are loaded await GetWorld().GetTimer().Wait(0.0) # Wire up the events. # When a player enters the trigger, run 'MakeItSpooky' trigger_volume.OnPlayerEnter += MakeItSpooky # When a player leaves, run 'MakeItNormal' trigger_volume.OnPlayerLeave += MakeItNormal # The "Spooky" function MakeItSpooky := func(player: Player): void= # Activate the Post Process device # This applies the green tint, vignette, etc. we set in the editor post_process_device.Activate() # The "Normal" function MakeItNormal := func(player: Player): void= # Deactivate the device post_process_device.Deactivate()