Hiding Spot
A Hiding Spot is a data structure used by Alter Ego. It represents a place where Players can hide to evade detection.
It functions somewhat like a Room contained within a single Fixture. It is its own space where Players can speak and interact with each other, albeit in a very limited and temporary manner.
In a Hiding Spot, Players cannot interact with any Fixtures other than the one they are hidden in. They also cannot interact with any Room Items except for those contained inside of the Fixture the Hiding Spot belongs to.
Hiding Spots do not have a dedicated sheet on the spreadsheet. Rather, they are derived from data on the Fixtures sheet. If a Fixture has a hiding spot capacity greater than 0, a Hiding Spot will be created and assigned to it.
Attributes
Hiding Spots have few attributes.
Name
- Class attribute: String
this.name
This is the name of the Hiding Spot. It matches the name of the Fixture it belongs to.
Capacity
- Class attribute: Number
this.capacity
This is the capacity of the Hiding Spot. It represents how many Players can hide in it at once. It is inherited from the hiding spot capacity of the Fixture it belongs to.
Occupants
This is an array of all of the Players currently hidden in this Hiding Spot.
Whisper
This is the Whisper currently associated with this Hiding Spot. All Hiding Spots have a Whisper when they are occupied. This is so that their occupants can whisper to each other without being heard in the surrounding Room.
Whenever a Player who doesn’t have the no sight behavior attribute is added to the Hiding Spot,
the current Whisper is deleted, and a new one is created with the new list of occupants.
When the Whisper is deleted, it is set as null.
Methods
Hiding Spots have a number of functions that can be useful to moderators. This is not an exhaustive list of publicly
accessible methods; only ones that are likely to be useful when writing Flag value scripts, or
if and var
tags in descriptions.
getFixture
this.getFixture();
- Purpose: Gets the fixture this belongs to.
- Returns: Fixture
- Parameters: None.
getLocation
this.getLocation();
- Purpose: Gets the room this hiding spot is in.
- Returns: Room
- Parameters: None.
generateOccupantsString
this.generateOccupantsString(viewerHasNoSightBehaviorAttribute?);
- Purpose: Generates a string representing the occupants of the hiding spot.
- Returns: String
- Parameters:
- Boolean
viewerHasNoSightBehaviorAttribute- Whether or not to return a vague list indicating the quantity of occupants. If this istrue, returns the number of occupants followed bypeopleif there is more than 1 occupant, orsomeoneif there is only 1. Defaults tofalse.
- Boolean