Skip to content

API: Announcements

Robert Fraser edited this page Aug 27, 2019 · 1 revision

The announcements library has a few functions to provide useful messages to players. There are a few times of announcements provided.

Countdown Announcement

GM:CountdownAnnouncement(length, endtext, endsound, ticksound)

Creates a simple countdown which counts down a few seconds before displaying the specified end message. Sounds can be added for the end message and for each tick. This is displayed for all players.

Example: creates a 3 second countdown (3, 2, 1, Fight!)

GAMEMODE:CountdownAnnouncement(3, "Fight!")

Pulse Announcement

GM:PulseAnnouncement(duration, text, size, sound)

Creates a subtle pulse message in the middle of the screen. This is displayed for all players.

GM:PulseAnnouncementTwoLine(duration, text, subtext, size, sound)

Same as the above, but with an additional smaller line.

GM:PlayerOnlyAnnouncement(ply, duration, text, size, sound)

Same as GM:PulseAnnouncement, but only for a single player.

Camera Transitions

GM:EntityCameraAnnouncement(ent, duration, offset, distance)

Displays a cool camera transition which will then orbit the given entity.

GM:CoolTransitionTable(tbl)

Documentation pending. Displays a raw camera transition. This table is unchecked so be careful!