TM::InputEventBuffer::Add Method

Adds an input event to the buffer.

Syntax

void TM::InputEventBuffer::Add(
int time,
InputType type,
int value
)

Parameters

int time
The input time in milliseconds. This time is 0 based, just like inputs in a script file.

InputType type
The input type to add. Specify InputType::GiveUp to add a RaceIsRunning event or FakeFinish to add a FakeFinishLine event.

int value
The value of the input. If an input is analog (InputType::Steer and InputType::Gas), the value should be between -65536 and 65536. If the value is binary, it should be either 0 or 1.

Return value

None.

Remarks

This is the easier version of the Add method. This method will also ensure that a RaceIsRunning event is present in the buffer.