SCP - Containment Breach
Loading...
Searching...
No Matches
CB.Event Namespace Reference

Functions

CB::Event get_First () property
CB::Event get_Last () property
CB::Sound LoadSound (CB::Event@ event, string file, int num=0)
CB::Event Create (string eventName, string roomName, int id, float probability=0)
 Creates an event.
float UpdateElevator (float state, CB::Door@ door1, CB::Door@ door2, B3D::Entity@ room1, B3D::Entity@ room2, CB::Event@ event, bool ignorerotation=true)
 Updates an elevator.
void UpdateAll ()
void UpdateDimension1499 ()
void UpdateEndings ()
void IsIn914Input (CB::Room@ room, float x, float y, float z)

Function Documentation

◆ Create()

CB.Event CB.Event.Create ( string eventName,
string roomName,
int id,
float probability = 0 )

Creates an event.

Parameters
eventNameThe name of the event to be created.
roomNameThe name of the room the event is to be created in.
idThe event will be created in the id-th instance of the specified room. Only applicable if probability is 0.
probabilityThe probability that the event will spawn in each instance of the specified room.
Returns
The created event;

◆ UpdateElevator()

float CB.Event.UpdateElevator ( float state,
CB.Door@ door1,
CB.Door@ door2,
B3D.Entity@ room1,
B3D.Entity@ room2,
CB.Event@ event,
bool ignorerotation = true )

Updates an elevator.

Parameters
stateThe room state to serve as the previous elevator state.
door1The first elevator door.
door2The second elevator door.
room1The pivot the first elevator room should use.
room2The pivot the second elevator room should use.
eventThe event the elevator is associated with.
ignorerotationWhether or not to ignore the rotation of the pivots.
Attention
Each pivot should sit at the center of their respective elevator space of 560 x 560 x 560 at roomscale.
Returns
The next elevator state.
Attention
The caller is responsible for maintaining the elevator's state. It is recommended to call this function from Hook_UpdateEvent and store it via one of the event's states.