header general

[SUBMISSION] Breakable Hydrant Variants

  • ozymandias81
  • ozymandias81's Avatar Topic Author
  • Pain Elemental
  • Pain Elemental
More
11 years 3 weeks ago #2186 by ozymandias81
Replied by ozymandias81 on topic Breakable Hydrant variants
Ok Gez, I'll scout for some more "metallic" sound then.

Please Log in or Create an account to join the conversation.

  • Blue Shadow
  • Blue Shadow's Avatar
  • Administrator
  • Administrator
More
11 years 3 weeks ago #2187 by Blue Shadow
Replied by Blue Shadow on topic Breakable Hydrant variants

ozymandias81 wrote: Do you mean that I didn't fix the sound issue for you?!?!

No, no, it works fine.

But seriously, I have the following notes (or rather, nitpicks) regarding this piece of code and similar:
Code:
Broken: HYDR EFGH 4 A_PlaySound ("hydrant/broken", 0, frandom(2.0, 3.0), 1, ATTN_NORM) Loop
  • 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.

  • ozymandias81
  • ozymandias81's Avatar Topic Author
  • Pain Elemental
  • Pain Elemental
More
11 years 2 weeks ago #2192 by ozymandias81
Replied by ozymandias81 on topic [SUBMISSION] Breakable Hydrant Variants
Ok BS, your "nitpicks" are fixed now. :lol:
This is the new code for looping sound + "Broken" state:
Code:
Death: HYDR B 4 A_Scream HYDR CD 4 TNT1 A 0 A_PlaySound ("hydrant/broken", "SoundSlot7", frandom(0.8, 1.0), TRUE, ATTN_NORM) Broken: HYDR EFGH 4 Loop

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
  • Blue Shadow's Avatar
  • Administrator
  • Administrator
More
11 years 2 weeks ago #2194 by Blue Shadow
Replied by Blue Shadow on topic [SUBMISSION] Breakable Hydrant Variants

ozymandias81 wrote: This is the new code for looping sound + "Broken" state:

There is one issue with that: channel is an integer value, not a string. See here .

Please Log in or Create an account to join the conversation.

  • ozymandias81
  • ozymandias81's Avatar Topic Author
  • Pain Elemental
  • Pain Elemental
More
11 years 2 weeks ago - 11 years 2 weeks ago #2196 by ozymandias81
Replied by ozymandias81 on topic [SUBMISSION] Breakable Hydrant Variants
Channel changed to 7. Thankx to get the point BS, now I know I have some actors that needs to be fixed this way then (I usually kek on ZWiki, but today I was really in a hurry for lunchtime reasons).

Fun Stuff: Could I say a joke? "Blue Shadow: The King of Nitpicks"! :lol:
Last edit: 11 years 2 weeks ago by ozymandias81.

Please Log in or Create an account to join the conversation.

  • Blue Shadow
  • Blue Shadow's Avatar
  • Administrator
  • Administrator
More
11 years 2 weeks ago #2199 by Blue Shadow
Replied by Blue Shadow on topic [SUBMISSION] Breakable Hydrant Variants

ozymandias81 wrote: now I know I have some actors that needs to be fixed this way then

Well, only those that use A_PlaySound which need fixing. The ones that use A_PlaySoundEx probably don't.

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.

Hopefully this clarifies things

"Blue Shadow: The King of Nitpicks"!

I wouldn't say "king", but at this pace, I'm certainly getting there :p

Please Log in or Create an account to join the conversation.

  • ozymandias81
  • ozymandias81's Avatar Topic Author
  • Pain Elemental
  • Pain Elemental
More
11 years 2 weeks ago #2201 by ozymandias81
Replied by ozymandias81 on topic [SUBMISSION] Breakable Hydrant Variants
I certainly must choose A_PlaySound instead of the "Ex" one, because as ZDoomWiki says, it's deprecated.

http://zdoom.org/wiki/A_PlaySoundEx

Please Log in or Create an account to join the conversation.

  • ozymandias81
  • ozymandias81's Avatar Topic Author
  • Pain Elemental
  • Pain Elemental
More
10 years 7 months ago #2952 by ozymandias81
Replied by ozymandias81 on topic [SUBMISSION] Breakable Hydrant Variants
Finally had some time to catch the "break" sound, and I guess it works now.
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
  • MagicWazard's Avatar
  • Moderator
  • Moderator
More
10 years 3 weeks ago #3782 by MagicWazard
Replied by MagicWazard on topic [SUBMISSION] Breakable Hydrant Variants
There seems to be something wrong with the .zip file. I can't open it up in SLADE3 or extract the WAD from Windows. Any chance you could re-zip it and try uploading it again?

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.

  • Tormentor667
  • Tormentor667's Avatar
  • Founder
  • Founder
More
10 years 3 weeks ago #3799 by Tormentor667
Replied by Tormentor667 on topic [SUBMISSION] Breakable Hydrant Variants
Props shouldn't be auto-aimed in general in my eyes, as they would distract from auto-aiming real treats like monsters. :)

Please Log in or Create an account to join the conversation.