[SUBMISSION] Breakable Hydrant Variants
Please Log in or Create an account to join the conversation.
- Blue Shadow
- Administrator
- Posts: 1129
No, no, it works fine.ozymandias81 wrote: Do you mean that I didn't fix the sound issue for you?!?!
But seriously, I have the following notes (or rather, nitpicks) regarding this piece of code and similar:
- Since the sound is looped, there is no need to call A_PlaySound repeatedly.
- volume ranges from 0 to 1.0. You cannot go beyond that.
- For readability, try to use constant names where applicable (i.e. use CHAN_AUTO for channel instead of 0; TRUE for looping instead of 1).
- And speaking of channels, using CHAN_AUTO is not really needed here. With CHAN_AUTO, the engine does a search for an unoccupied channel to play the sound on. This is a needless extra work on behave of the engine in our case, as these hydrant actors only play two sounds at most: the braking and splashing sounds. Since the breaking sound is played on CHAN_VOICE , then it's very easy to pick another channel that doesn't conflict to play the other sound on without the need to search for an unoccupied channel.
And a couple more things:
- Unless you're including a test map, editor numbers shouldn't be added to actors.
- You don't need to put INFO and CREDITS lumps outside the WAD. Putting them inside is enough.
Please Log in or Create an account to join the conversation.
This is the new code for looping sound + "Broken" state:
Updated main OP file, obviously. Now I need to scout for some more fitting "metallic break" sounds and I'll be done with it.
Please Log in or Create an account to join the conversation.
- Blue Shadow
- Administrator
- Posts: 1129
There is one issue with that: channel is an integer value, not a string. See here .ozymandias81 wrote: This is the new code for looping sound + "Broken" state:
Please Log in or Create an account to join the conversation.
Fun Stuff: Could I say a joke? "Blue Shadow: The King of Nitpicks"!
Please Log in or Create an account to join the conversation.
- Blue Shadow
- Administrator
- Posts: 1129
Well, only those that use A_PlaySound which need fixing. The ones that use A_PlaySoundEx probably don't.ozymandias81 wrote: now I know I have some actors that needs to be fixed this way then
I don't know about the technicality behind passing a string to an integer parameter in DECORATE, but in this case, zero seems to be what is passed to the parameter, regardless, with zero being CHAN_AUTO.
A_PlaySoundEx's channel parameter is a string (name), which accepts these values:
I wouldn't say "king", but at this pace, I'm certainly getting there :p"Blue Shadow: The King of Nitpicks"!
Please Log in or Create an account to join the conversation.
http://zdoom.org/wiki/A_PlaySoundEx
Please Log in or Create an account to join the conversation.
Took from Return to Castle Wolfenstein for Blade of Agony.
I guess I am done with this one then.
Please Log in or Create an account to join the conversation.
- MagicWazard
- Moderator
- Posts: 808
Also, I notice the hydrants aren't auto-aimed at. Was this intentional? It seems like it could be, but I just want to be sure.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.