ID:150210
 
The title says it all. Here is the code, anyone know how to do this? I want anything within view of a type of this kind to usr << sound('river.wav',1)

Here is my code
turf/
water
icon = 'water.dmi'
density = 1
if(view())
usr << sound('river.wav',1)

I altered the indentions here.

LJR
LordJR wrote:
The title says it all. Here is the code, anyone know how to do this? I want anything within view of a type of this kind to usr << sound('river.wav',1)

Here is my code
turf/
water
icon = 'water.dmi'
density = 1
if(view())
usr << sound('river.wav',1)

I altered the indentions here.

LJR

look up Entered()
In response to Air _King
Yeah I know what your getting out.
But Enter() won't work in my case as I want people up
to 5-6 Titles away to be able to hear the sound and they are no where near entering the title the sound comes from.

There must be a way to do this?

LJR
In response to LordJR
LordJR wrote:
Yeah I know what your getting out.
But Enter() won't work in my case as I want people up
to 5-6 Titles away to be able to hear the sound and they are no where near entering the title the sound comes from.

There must be a way to do this?

LJR

View()<<sound('whatever.mid',1)
In response to Air _King
Still not what he wanted.
In response to Nadrew
ok then what do you want it to happen when they enter a turf??? area???
In response to Air _King
sigh:: I already told u NO!

I've become a well adept programmer of DM lately and I have the Blue Book as well, therefore when I ask something here from now on, it will be a little bit more involved than most post around here. Even though the answer may be a simple one, it should by no means be well known or often asked.

Hmm perhaps there is a way to make and call a
Turf proc?

Anyone think that would work?

LJR
Perhaps you could make a new area that extends about 5 turfs around the river. Then put the sound on/off code in the area's Entered() and Exited() procs.
In response to Air Mapster
Air Mapster wrote:
Perhaps you could make a new area that extends about 5 turfs around the river. Then put the sound on/off code in the area's Entered() and Exited() procs.

Yep I've thought about this, but since the river is irregular, that would be very difficult.
Or would I do this with underlying /area?

LJR
In response to LordJR
LordJR wrote:
Air Mapster wrote:
Perhaps you could make a new area that extends about 5 turfs around the river. Then put the sound on/off code in the area's Entered() and Exited() procs.

Yep I've thought about this, but since the river is irregular, that would be very difficult.
Or would I do this with underlying /area?

Exactly. For each turf within a certain distance of the river, just make its underlying area be /area/downbytheriverside or whatever you want to call it. Then put your Entered() and Exited() procs under area/downbytheriverside.