Home   Help Search Login Register  

Author Topic: Pesky Pop-up Targets & Sound  (Read 2889 times)

0 Members and 1 Guest are viewing this topic.

Pesky Pop-up Targets & Sound
« on: 24 Jul 2007, 22:56:56 »
I've been trying to use the Pop-Up Targets but couldn't work out how to keep the damn things down after shooting them once. I tried adding a "hit" eventHandler which executes animate["terc",1] but regardless, the target always pops back up after about 3 seconds.

Anyway, I can't be the only one who tried to get round this, so after much experimenting (and raiding the training mission scripts) I thought I'd share my findings.

Either in init.sqs (or the init field of any unit) add NOPOP=TRUE

This causes the target's built-in eventHandler to exit before the target pops back up!

In addition, use _this animate["terc",1] in the init field of each target and they'll start already down. Triggers can then be used to make individual ones spring back up using object animate["terc",0]. All I need now is a custom "spring-board" sound to accompany the animation. Any offers?
« Last Edit: 31 Jul 2007, 00:36:29 by DeadActionMan »
There are 10 types of people in the world. Those who understand binary, and those who don't

Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Re: Pesky Pop-up Targets
« Reply #1 on: 25 Jul 2007, 21:11:44 »
www.sounddogs.com have a large range of sounds, your bound to find what you want there.

This information is quite useful. I have an obstacle course map where one person goes into it and others observe outside. I want the popup to stay down once shot, and then reset them when the other person finishes. This will do the trick, thanks.

Re: Pesky Pop-up Targets
« Reply #2 on: 26 Jul 2007, 01:32:56 »
Thanks for the link JasonO, I've found just what I'm looking for!

I am however having problems getting the targets to say something. I've got the description.ext, stringtable.csv and the ogg file sorted but when I use target say "popupSpring", the sound doesn't come from the target... it just blasts out wherever I am standing. I even tried moving the target object to the other side of the map and it still sounds like it's coming from me.

I'm sure I used say to make an object/unit make noise in Opflash? Do I have to learn everything over again for ArmA?

Also, a dumb text prompt appears whenever the sound is played showing "Pop-Up Target Spring"

My description.ext seems ok... doesn't it?

class CfgSounds
{
   sounds[] = {popupSpring};

   class popupSpring
   {
      name = "Pop-Up Target Spring";
      sound[] = {"\sound\popup.ogg", db-10, 1.0};
      titles[] ={ 0, $STR_POPUP,};
   };
};

Any help would be appreciated :)
There are 10 types of people in the world. Those who understand binary, and those who don't

Offline firecontrol

  • Members
  • *
Re: Pesky Pop-up Targets
« Reply #3 on: 26 Jul 2007, 07:07:21 »
That's very odd... yes the "say" command should create the sound from the object... playSound makes it come from the player's position.

About the text... it looks strikingly familiar to your "name" you assigned it... try this, I use it like this and have no problems:

Code: [Select]
class CfgSounds
{
   sounds[] = {};

   class popupSpring
   {
      name = "";
      sound[] = {"\sound\popup.ogg", 1, 1};
      titles[] ={};
   };
};

About the 'sound[] = {"\sound\popup.ogg", 1, 1};' line... I don't think you can change it like the radio/music with db-10, etc.... anything I've tried in there doesn't seem to affect it.

See if that works for you. The few "say" sound commands I have set up like this are working quite nicely.

Re: Pesky Pop-up Targets
« Reply #4 on: 26 Jul 2007, 13:07:40 »
Think I've solved the sound problem... with some help from firecontrol :good:

Even though the ogg file was recorded at sensible level, it was just too loud in game, giving the false impression it was coming from "everywhere". I edited the ogg file and adjusted the volume to a teeny tiny amount and retested. Seems to work ok but I thought the volume was set in the description.ext file with sound[] = {"\sound\popup.ogg", db-10, 1};

Isn't that what the db-10 does (-10db)?

Using titles[] ={}; stopped the text appearing on-screen.

There are 10 types of people in the world. Those who understand binary, and those who don't

Offline Trapper

  • Honoured Contributor
  • ***
  • I'm a llama!
Re: Pesky Pop-up Targets
« Reply #5 on: 29 Jul 2007, 01:33:00 »
If it's still like OFP, then db-10 does...

...define the virtual 3D volume of the played sound or in other words the "audio sphere" around the saying object in which it is heared, until a distance is reached where it's volume is lowered to zero so that you can't hear it anymore.

Lowering the volume of the .ogg is another way to achieve the same effect.
Maybe it uses up more resources, as the "audio sphere" should have the same radius as before, just the .ogg volume is so low that it is quiet in the outer part of the sphere. (I'm only guessing here.)

I would have set a high value like db-120 if necessary instead as the audible result would be the same.
Important is to remember that every change inside the decription.ext requires the reload of your .sqm in the mission editor to take effect.
Since I've configured many said custom sounds like that, I absolutely doubt sound-description examples like the one by firecontrol, which replace the db value by "1".

EDIT:
That's probably the right approach... db10000 wouldn't blow your speakers while standing close to the saying object. The sound would just be heard anywhere on the island...so the goal should be to edit/amplify the .ogg file to a volume which represents the closest possible distance to the sound...then the description.ext should be used to reduce the "audio sphere" to a realistic size.
Though it could require a compromise. Even if db isn't able to actually amplify the playback of a said .ogg sound, it's able to lower the output volume at zero distance to zero if the db value is just low enough.
« Last Edit: 29 Jul 2007, 01:55:01 by Trapper »

Offline firecontrol

  • Members
  • *
Re: Pesky Pop-up Targets
« Reply #6 on: 29 Jul 2007, 02:07:57 »
No clue.
According to the wiki, under the description.ext page... they use 1, 1 for sounds instead of the db-100, 1.0 which is used for radio and music.

I can change the volume of the radio and music by adjusting the db+or- values... but the sounds would never change when I tried using db-100 or db+100, etc.... It doesn't seem to affect anything really, for me anyhow. Close, far, loud, quiet.. all the same. By this I mean it works as it should, the closer you get, the louder the sound, etc. Any adjustments don't do anything. Yes, I know about reloading the mission after changing description.ext.

Offline Trapper

  • Honoured Contributor
  • ***
  • I'm a llama!
Re: Pesky Pop-up Targets
« Reply #7 on: 29 Jul 2007, 13:12:15 »
If it wouldn't require that many addons, I would suggest to download my OFP mission Zombie Outbreak Simulation, where I adjusted every sound like this.

As you did remember to reload the file, the only things to do for noticing changes are extreme testing methods:

- Rise your speakers volume to a cinema/"realistic" volume. Explosions/shots near the player should start to become uncomfortable to the ears. (Reducing the overall volume should only be left to the players choice later. Important is that you don't test play on such a low volume that you implement crickets louder as bullets, just because you aren't able to hear them yourself when they're played with a realistic low volume in comparison. Imagine what a "max volume" player would think about your crickets, surprisingly blowing him out of the chair.)

When the 'say' sounds like 'playsound' everything is much too maxed out for the effect you want to create.
- Place the player/yourself kilometers away from the sound source. Has the sound disappeared? Does it become directional at least? If not move further/closer in big steps until it does.
- Now do a big negative value change like db-150, reload and at the same position as before you should start to notice a change.

This way you'll get the feeling for this particular sound's values and you're ready to begin to set it up like you want it.

Should you discover that after achieving the right range, that the sound is to low while standing directly to the source, you have to adjust the .ogg vs the db value until you like the outcome of direct/distance sound levels.
« Last Edit: 29 Jul 2007, 13:14:38 by Trapper »

Offline firecontrol

  • Members
  • *
Re: Pesky Pop-up Targets
« Reply #8 on: 29 Jul 2007, 17:39:45 »
We're talking ArmA here right?

Offline Trapper

  • Honoured Contributor
  • ***
  • I'm a llama!
Re: Pesky Pop-up Targets
« Reply #9 on: 29 Jul 2007, 20:58:34 »
I'm porting my OFP db experiences directly into ArmA without any additional tests...   :P
I don't believe this part has changed, as the different examples showing 1 or db23 were already coexistent in OFP.

Offline firecontrol

  • Members
  • *
Re: Pesky Pop-up Targets
« Reply #10 on: 29 Jul 2007, 21:37:30 »
 ??? Maybe it has something to do w/ EAX being on or off.. I don't know. Like I said, only for the "sounds" class, I cannot seem to change it with any db-10, etc. commands.

Music and Radio work just fine.

Offline Trapper

  • Honoured Contributor
  • ***
  • I'm a llama!
Re: Pesky Pop-up Targets
« Reply #11 on: 29 Jul 2007, 23:03:39 »
I'm getting a little bit tired of repeating my solicitation to test it like written above, so I've finally created a demo mission for everyone to check out.  :blink:
I'm playing with EAX on and sound hardware acceleration off and all four values sound different on my machine.

Put your volume up until your rifle makes a full "bang" and then try the radio triggers:
db-45 (default) sounds like the carousel's squeak should be heard in comparison to everything else in ArmA world.
db0 sounds like playsound at the distance I've placed the player. Position yourself much further away and you'll notice that it's volume is lower then.
db10000 sounds like db0 at default distance, but should still sound like playsound when you position yourself anywhere far away on Rhamadi's cost.
db-100 is way too quiet, but will still be heared with proper volume at the default position, otherwise move up close to the carousel.

It's important to experiment with your/player distance to notice that it is really a cfgsound which creates an "audio sphere". Max volume at it's center and decreasing volume towards it's outer border until the sphere has reached it's limit and there is silence.
« Last Edit: 29 Jul 2007, 23:14:33 by Trapper »

Offline firecontrol

  • Members
  • *
Re: Pesky Pop-up Targets
« Reply #12 on: 29 Jul 2007, 23:54:56 »
Thanks.

Can we say that a db+20 will not amplify the sound, only increase the distance which it can be heard? That's what I'm trying to figure out.

Help me here if you're not too weary: db+20 will amplify music. db+20 will not amplify sound. Correct?

Meant to point this out back up there too....

Fixed:
Quote
Since I've configured many said custom sounds like that, I absolutely doubt sound-description examples like the one by the wiki, which replace the db value by "1".

Sorry, felt a little attacked. :)
« Last Edit: 30 Jul 2007, 00:05:23 by firecontrol »

Offline Trapper

  • Honoured Contributor
  • ***
  • I'm a llama!
Re: Pesky Pop-up Targets
« Reply #13 on: 30 Jul 2007, 02:04:19 »
So be it "the wiki's" fault. :)

Correct.
db+20 will amplify the playback volume of an .ogg file defined as cfgmusic class.

db+20 will not amplify the playback volume of an .ogg file defined as cfgsound class.
Only as a side effect it is able to lower the playback volume of the .ogg file directly at it's 3D-position-source, when the virtual hearing distance/db is lowered extremely.
« Last Edit: 30 Jul 2007, 02:08:14 by Trapper »

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
Re: Pesky Pop-up Targets & Sound
« Reply #14 on: 06 Mar 2008, 03:09:03 »
DeadActionMan,

I would like to use your springboard sound for the popup targets if you are willing to share it.

What would be really awesome is a tiny sample mission showing off how you scripted these (i.e., player walks into trigger, target pops up (with sound), player shoots it, target drops).  This would be a handy resource for the community.

What do you say?

thanks

johnnyboy
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...