using { /Fortnite.com/Devices } using { /Verse.org/Sim } # This is our main script. It lives on a device. class RescueScript is VerseSimActor(): # This is a list of all players in the game. # We call this a "Player List". Players := [] # This function runs when the game starts. Initialize(): # Get all players currently in the game. Players := GetPlayers() # This function runs every single frame. # A frame is one tiny moment in time. Tick(): # We look at each player one by one. for Player in Players: # Check if this player is currently downed. if Player.IsDowned(): # Find other players nearby. NearbyPlayers := GetPlayersNearby(Player, 5.0) # Look at each nearby player. for Friend in NearbyPlayers: # If the friend is not downed themselves, # we can revive the first player! if not Friend.IsDowned(): # Heal the downed player to full health. Player.Heal(100.0) # Remove the downed state. Player.RemoveDownedState() # Show a happy sound effect. PlaySound("HealSound")