Here's an example:
this DSA must point to a text (generally hidden inside a wall).
When the DSA receives a SET message, the text will be displayed in the text area.
If parameter B is not defined, default is 15 (white).
You can disable the DSA with a T3 message (=Toggle west)
Code: Select all
Description = Say text at A --- B (optional): text color
State = 0
StateLocation = 0
GroupID = 0
Number of States = 1
First Displayed State = 0
Number of non-empty states = 1
State Number = 0
Number of Actions = 4
0S0 = LA LB ?G0C0:GT0 &SAY
0C0 = LB
0T0 = L15
0T3 = 1N
signature = 5546F283163100749C0793E7C57CFD1C
This one is to teleport the party to A when receiving a SET msg.
This one will allow you to send messages to another level, it acts as a relay:
Code: Select all
Description = Relay MSG to A
State = 0
StateLocation = 0
GroupID = 0
Number of States = 1
First Displayed State = 0
Number of non-empty states = 1
State Number = 0
Number of Actions = 12
0S0 = MS
0C0 = MC
0T0 = MT
0S1 = OP1 MS
0C1 = OP1 MC
0T1 = OP1 MT
0S2 = OP2 MS
0C2 = OP2 MC
0T2 = OP2 MT
0S3 = OP3 MS
0C3 = OP3 MC
0T3 = OP3 MT
signature = 6CA154E3E39DC49E47B507873F9DA710
This one plays sound A (A is the ID of the sound in CSBgraphics.dat)
Sound is only played if the party is on same level as the DSA instance.
SET msg: sound is played with a volume inversely proportional to distance. So you should put the DSA instance right where the origin of the sound is supposed to be, or very near.
CLOSE msg: sound is played at full volume, no matter the distance.
TOGGLE msg: sound is played with a volume inversely proportional to distance, with a random chance. B parameter is the chance
not to be played.
Code: Select all
Description = Sound A
State = 0
StateLocation = 1
GroupID = 0
Number of States = 2
First Displayed State = 0
Number of non-empty states = 2
State Number = 0
Number of Actions = 8
0S0 = G0C1 &= ?J0C3
0C0 = G0C1 &!= ?J0C2 LA L0 L0 &SOUND
0T0 = LB &RAND &NOT ?J0S0
0C1 = L$ &LOC2ABSCOORD &DROP &ROT L0 L4 &PARTY@ L1 &@
0C2 = N
0T2 = &NEG
0C3 = V3@ &NEG &+ &DUP L0 &< ?G0T2 &SWAP V2@ &NEG &+ &DUP L0 &< ?G0T2 &+ J0T3
0T3 = LA &SWAP L0 &SOUND
State Number = 1
Number of Actions = 0
signature = CBE01B63751F56C2396378DE8423B9E0