Verse Library verse

02 Device

Manages player visibility states, shared flicker timing, and vulnerability durations for stealth mechanics.

verse-library/triad-infiltration-making-players-invisible-in-verse/02-device.verse

invisibility_manager := class(creative_device):
    # List of player spawners for our team
    @editable
    PlayerSpawners : []player_spawner_device = array{}

    # Should all teammates flicker together?
    @editable
    IsVisibilityShared : logic = true

    # How long they stay visible after getting hit (in seconds)
    @editable
    VulnerableSeconds : float = 3.0

    # How fast they flicker (in seconds)
    @editable
    FlickerRateSeconds : float = 0.4

    # This map stores time left for each player
    # Key = agent, Value = Seconds left
    var PlayerVisibilitySeconds : [agent]float = map{}

Comments

    Sign in to vote, comment, or suggest an edit. Sign in