… | |
… | |
212 | When a state argument is given it should be either 0 or 1. 1 will 'push' the connection |
212 | When a state argument is given it should be either 0 or 1. 1 will 'push' the connection |
213 | and 0 will 'release' the connection. This is useful for example when you want to |
213 | and 0 will 'release' the connection. This is useful for example when you want to |
214 | let a npc control a door. |
214 | let a npc control a door. |
215 | |
215 | |
216 | Trigger all objects with the given connected-id by 'releasing' the connection. |
216 | Trigger all objects with the given connected-id by 'releasing' the connection. |
|
|
217 | |
|
|
218 | =item @playersound face-name |
|
|
219 | |
|
|
220 | Plays the given sound face (either an alias or sound file path) so that |
|
|
221 | only the player talking to the npc can hear it. |
|
|
222 | |
|
|
223 | =item @npcsound face-name |
|
|
224 | |
|
|
225 | Plays the given sound face (either an alias or sound file path) as if |
|
|
226 | the npc had made that sound, i.e. it will be located at the npc and all |
|
|
227 | players near enough can hear it. |
217 | |
228 | |
218 | =item @addtopic topic |
229 | =item @addtopic topic |
219 | |
230 | |
220 | Adds the given topic names (separated by C<|>) to the list of topics |
231 | Adds the given topic names (separated by C<|>) to the list of topics |
221 | returned. |
232 | returned. |
… | |
… | |
262 | @match = $msg =~ /$args/i |
273 | @match = $msg =~ /$args/i |
263 | or next topic; |
274 | or next topic; |
264 | |
275 | |
265 | } elsif ($cmd eq "comment") { |
276 | } elsif ($cmd eq "comment") { |
266 | # nop |
277 | # nop |
|
|
278 | |
|
|
279 | } elsif ($cmd eq "playersound") { |
|
|
280 | $self->{ob}->contr->play_sound (cf::sound::find $args); |
|
|
281 | |
|
|
282 | } elsif ($cmd eq "npcsound") { |
|
|
283 | $self->{npc}->play_sound (cf::sound::find $args); |
267 | |
284 | |
268 | } elsif ($cmd eq "cond") { |
285 | } elsif ($cmd eq "cond") { |
269 | cf::safe_eval $args, %vars |
286 | cf::safe_eval $args, %vars |
270 | or next topic; |
287 | or next topic; |
271 | |
288 | |