Fs2 msg write

From Sim Innovations Wiki
Jump to navigation Jump to search



fs2_msg_write is used write a message to FS2.

Return value

This function won't return any value.


# Argument Type Description
1 msg String Reference to a message from FS2
2 flags String Flags to be passed with the message. Can be NONE, STATE, OFFSET, EVENT, TOGGLE, VALUE, ACTIVE, NORMALIZED, DISCRETE, MINIMUM, MAXIMUM, VALID, LARGE, MOVE, SETTING, SYNCHRONIZE or body. Multiple flags can be seperated by '|' sign.
3 type String (Optional) Data type of the DataRef, can be INT, FLOAT, DOUBLE, VECTOR2D, VECTOR3D, VECTOR4D or STRING
4 value Number (Optional) The value to be written


-- Write 99 to dataref "View.OffsetX"
fs2_msg_write("View.OffsetX", "VALUE", "DOUBLE", 99)

-- Toggle pause
fs2_msg_write("Simulation.Pause", "TOGGLE")