ID:167277
![]() Apr 6 2006, 1:44 am
|
|
Does byond support .wav files
|
Usr should never be used unless there isn't an alternative. That's what I was taught.
If it was a verb inside a custom datum, for instance, say an Admin datum. Then it should be usr, because src would refer to the Admin datum itself. However, because it's inside the mob, src being the mob, which the client is connected directaly to. src would be the best choice to use. Of coarse, anyone with more knowledge in DM is free to correct me if I have anything mixed up. But I know for sure, src is better to use. |
No. I'm not going to say that it should not be usr either though. But no, using usr is no more correct than using anything else.
|
KirbyRules wrote:
But it's a verb! Shouldn't it be usr? It *could* be usr, but src is better. Usr is safe in verbs, except for when you're calling the verb from outside. But in this case, both src and use are correct. O-matic |
My personal preference agrees. The only time I ever use usr is in a verb that does not belong to usr; and sometimes in mouse-related functions, though I don't even always use it there either.
With the functions where usr is alright, such as in atom/Click, I still sometimes override the client version so that I don't need usr. client/Click(object, location) |
Although that is a decent rule of thumb, very often, usr is the right thing to use. usr is the one who calls the proc, which is sometimes who you want to refer to. Sometimes you start a proc on someone who is not yourself.
In cases like that, I normally try to pass the usr off in a variable defined by me, to ensure that usr is who I expect it to be. That does not change the fact that usr has it's place, and should be used when needed. src is good because it is a constant, we know that src is the one holding the proc, so even if the usr and src should equal the same thing, it is best to just go with src. |
Same here. I try to stay away from usr. Hopefully, it will prevent me from overlooking any future usr abuse. It's been like this for a while now. I'll only use usr when it's needed.
|
SAY_Command() why wont it work. When i click the verb nothing happens |
No one has solved the problem eh? Ok, first off make sure your SPEAKERS are ON. Then, do it like this.
usr << sound('file.wav')//since its a verb, usr is ok. |
File names are case-sensitive. Make sure it has the same capitalization. (Perhaps .wav instead of .WAV)
Also check that you did not disable sounds. That can be checked in Options - Preferences / Client I'm sure you do have speakers on and not muted... |
Next!