ID:149903
 
here is my code
obj
door
icon = 'door.dmi'
icon_state = "close"
density = (1)
var/open = 1
verb
open()
set name = "Open_Door"
set category = "object_options"
set src in oview(1)
if (open == 2)
usr << "The door is already open."
if (open == 1)
icon_state = "open"
density = (0)
open = 2
if (usr.sound == 1)
usr << 'open1.wav'
if (usr.sound == 2)
..()

close()
set name = "Close_Door"
set category = "object_options"
set src in oview(1)
if (open == 1)
usr << "The door is already shut."
if (open == 2)
icon_state = "close"
density = (1)
open = 1
if (usr.sound == 1)
usr << 'close1.wav'
if (usr.sound == 2)
..()

knock()
set name = "Knock_on_Door"
set category = "object_options"
set src in oview(1)
if (usr.sound == 1)
usr << sound('knock.wav')
sleep(2)
usr << sound('knock.wav')
sleep(3)
usr << sound('knock.wav')



Here is the prob. I want every one in oview(8) to here the sounds. When I use oview(8) << sound('knock.wav') I can't here it. What is the prob?
Use view() not oview()

oview = view - src
In response to Nadrew
Nadrew wrote:
Use view() not oview()

oview = view - src

Minor correction there: oview() leaves out the center object (though not the turf it's on or anything else in that turf) and anything in its contents. With ordinary oview() calls, this defaults to usr, not src.

oview(8) == view(8)-usr
oview(8,src) == view(8,src)-src

Lummox JR
In response to Lummox JR
thanks alot!