Mapscenes shows views of the map behind the intro and the main menu.
Staff place camera points with the Mapscene tool, which is tied to the 'mapscenes'
permission; the points are saved per map and sent to every client. While the
ShouldMapsceneRender hook returns true, the client's view shows the points one after
another. The camera is controlled by the config keys mapscenes_speed (seconds spent on a
point), mapscenes_animated (glide from point to point instead of cutting) and
mapscenes_rotate_speed (how fast a view that does not glide turns).
Summary
Hooks
Methods
Hooks
Replaces the view with the current mapscene point while the ShouldMapsceneRender hook returns true. Depending on the config it cuts to the next point with a fade, glides between the points or slowly rotates the camera.
Parameters
- _client Player
- _origin Vector
- _angles Angle
- _fov Number
Returns
- Map view table with origin and angles, or nil if no mapscene is shown
Implements hook LoadData
Loads the mapscene points when the framework loads its data.
Implements hook PlayerInitialized
Sends all mapscene points to a player who has finished loading.
Parameters
- actor Player
Implements hook RegisterPermissions
Registers the 'mapscenes' permission.
Draws a marker, a direction line and a label for every mapscene point while the local player holds the mapscene tool and has the 'mapscenes' permission.
Implements hook SaveData
Saves the mapscene points when the framework saves its data.
Methods
Adds a mapscene camera point, sends it to all clients and saves the list. Serverside only.
Parameters
- pos Vector camera position
- ang Angle camera angles
Reads the mapscene points from the plugin data of the current schema and map, replacing the current list. Does not send them to clients. Serverside only.
Writes the mapscene points to the plugin data of the current schema and map. Serverside only.