Skip to content

Wiremod input and outputs

Grocel edited this page Oct 26, 2023 · 13 revisions

This list below will tell you about the functionalities of the Wiremod input and outputs of the radio entity. Keep in mind that it is not a tutorial, so it requires some of knowledge of Wiremod in general. If you are new to Wiremod, you should become familiar with the basic mechanics of Wiremod first. I also recommend to know some stuff about E2 as well.

Wiremod download:

Inputs:

  • Play [NORMAL]

    • Plays a stream when on 1 or greater else stop playing.
  • Pause [NORMAL]

    • Pauses the stream when on 1 or greater else resume.
  • Volume [NORMAL]

    • Set the Volume.
    • Takes 0-1.
  • Radius [NORMAL]

    • Sets the maximum distance of being audible.
    • Takes 0-5000.
  • Loop [NORMAL]

    • Makes the stream loop on 1 or greater when it's not an endless stream.
  • Time [NORMAL]

    • Sets the playback time position to the given value in seconds.
  • 3D Sound [NORMAL]

    • Enable 3D sound on 1 or greater. It's on by default.
  • Stream URL [STRING]

    • Set's the wire stream, press the wire icon or use the play input to play it.
    • It's an URL. See FAQ for more details.
  • Master Radio [ENTITY] (For synchronizing radios)

    • Set the master radio entity to synchronize from.
    • See section "Connecting radios together".

Outputs:

  • Play [NORMAL]

    • Returns 1 when in playing mode or 0 when not.
  • Pause [NORMAL]

    • Returns 1 when in pause mode or 0 when not.
  • Stopped [NORMAL]

    • Returns 1 when in stop mode or 0 when not.
  • Volume [NORMAL]

    • Returns its volume, it goes from 0 to 1.
  • Radius [NORMAL]

    • Returns its maximum distance of being audible.
    • Gives 0-5000.
  • Loop [NORMAL]

    • Returns 1 when the stream is looping.
  • Time [NORMAL]

    • Returns the playback time position as seconds.
  • Length [NORMAL]

    • Returns the stream length as seconds.
    • A value of -1 means endless stream.
  • Ended [NORMAL]

    • Returns 1 when the stream has ended.
  • 3D Sound [NORMAL]

    • Returns 1 when the 3D sound is on.
  • Stream Name [STRING]

    • Returns the name of the stream.
  • Stream URL [STRING]

    • Returns the URL of the stream.
  • Stream Error [NORMAL]

    • Returns the error code for the server side stream.
    • Returns 500 if Advanced Outputs are disabled.
  • Stream Error Text [STRING]

    • Returns the error as a string.
    • Returns "Advanced outputs are disabled" if Advanced Outputs are disabled.
  • This Radio [ENTITY] (For synchronizing radios)

    • Returns the radio entity for synchronizing.
    • See section "Connecting radios together".
  • Advanced Outputs [NORMAL]

    • It returns 1 if you can use the outputs below (called "Advanced Outputs"), otherwise returns 0.
    • Only active when enabled via the Streamradio tool.
    • It will be always off when gm_bass3 is not installed on the server.
    • It is off when the count of radios with advanced outputs enabled exceed the ConVar "sv_streamradio_max_spectrums".

Wirelink

The radio entity supports Wirelinks, including the entity:wirelink() function in E2.

Connecting radios together

You can connect radios (and so speakers as well) to other radios/speakers by using the "Master Radio" input.

Usage:

  • Connect "Master Radio" to "This Radio", no need for additional connections.
  • Connections can be done via a gateway like as an E2 as well. Wiremod mechanics apply.
  • While it is synchronizing its states are always set as same as the master states
  • While it is synchronizing you can not change the stream nor change its playing state manually or via Wiremod.
  • Disconnect this input to disable synchronization again.
  • Connecting a non-radio or an invalid entity disables the synchronization.
  • Creating a cycle or a connection to itself disables the synchronization for all involved radios.
  • The volume, radius and 3D sound are not synchronized by intention and can still be changed.

Gm_bass3:

It is an optional binary module for server (Advanced Wiremod Outputs) and client.

GM_BASS3 Download