User Tools

Site Tools


xg:class:sound

Table of Contents

Sound (XG class)

Class = sound

Plays a sound in one or more sectors.

Parameters

Prm Name Type Meaning
Ip0,Ip1 Target Ref,Target Num lsref Reference to one or more sectors. These are the sectors in which the sound is to be played.
Ip2 Sound ID Sound Name of the sound to play.
Ip3 Origin Integer If non-zero, play the sound from a specific origin within the referenced sector (1=floor, 2=ceiling) else play from the center.

Example

Line Type {
    ID = 5026
    Comment = "Play switch sound when player crosses line in the sector on the front side of the line"
    Class = sound
    Flags = player_cross
    Flags2 = when_act | any
    Count = 1
    Target Ref = "lsref_my"
    Sound ID = "swtchn"
}

Creates a line which, when crossed, plays the switch sound (Sound ID = “swtchn”) in the sector which is on the front of the line (Target Ref = “lsref_my”).

xg/class/sound.txt · Last modified: 2019-11-26 08:53 by skyjake