User Tools

Site Tools


xg:class:sound

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
xg:class:sound [2019-11-26 08:53] skyjakexg:class:sound [2019-11-26 08:53] (current) – [Parameters] skyjake
Line 1: Line 1:
 +====== Sound (XG class) ======
 +
 +
 +  Class = sound
 +
 +Plays a sound in one or more sectors.
 +
 +
 +===== Parameters =====
 +
 +
 +^ Prm^ Name^ Type^ Meaning |
 +| Ip0,Ip1| Target Ref,Target Num| [[xg:refs:lsref]] | Reference to one or more sectors. These are the sectors in which the sound is to be played. |
 +| Ip2| Sound ID| [[ded: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").
 +
 +