Home   Help Search Login Register  

Author Topic: sound file chosen for right sound  (Read 923 times)

0 Members and 1 Guest are viewing this topic.

Offline 456820

  • Contributing Member
  • **
sound file chosen for right sound
« on: 20 Jul 2005, 20:01:40 »
okay the title might sound weird but anyway
the problem is that ive seen an artillery script where it has sound files and when you click on a map to send the shells over there
a voice says
roger firing to AB25
for example basically the co ordinates that you clicked on

i looked at the script on how they did it and i dont get it none of the sound files match up woth in the script
forexample
playsound _bigAsay
and where they define _bigAsay on that line there is no sound file name

so i was windering how this is possible im tryng to do it with compass directions if the player spots an enemy to the east, however many metres away he will say that
cause it cant be the same each time it has to have someway of chosing the song

also sorry if this goes into the editing scripting general but i am talking about sounds here

anyway my description is written out quite bad if no one understands it im sorry and ill try to re prhase it

Offline Blanco

  • Former Staff
  • ****
Re:sound file chosen for right sound
« Reply #1 on: 21 Jul 2005, 00:50:31 »
Quote
ive seen an artillery script where it has sound files and when you click on a map to send the shells over there a voice says
roger firing to AB25
for example basically the co ordinates that you clicked on



Sounds cool, where can I find it?
He is actually saying the coords?  :P






Search or search or search before you ask.

Offline 456820

  • Contributing Member
  • **
Re:sound file chosen for right sound
« Reply #2 on: 21 Jul 2005, 12:32:06 »
its sentinals arty script find it in the editors depot
very good but its far too acurate i think but still great

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:sound file chosen for right sound
« Reply #3 on: 21 Jul 2005, 13:52:48 »
they wouldn't define it using a file name, just the string name assigned to it in the description.ext

if they don't do that, i would have to see the script to know what's going on

Offline 456820

  • Contributing Member
  • **
Re:sound file chosen for right sound
« Reply #4 on: 21 Jul 2005, 17:06:37 »
i know they use the string name but none of the assigned to it have the same name as the sound

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:sound file chosen for right sound
« Reply #5 on: 21 Jul 2005, 22:51:42 »
perhaps you could post that portion of the script and maybe even the corresponding description section?

Offline 456820

  • Contributing Member
  • **
Re:sound file chosen for right sound
« Reply #6 on: 22 Jul 2005, 11:50:59 »
well its a big script and im not sure wich parts to post cause i dont fullly understand it so i suggest you download it and have a look ill find a link

ahh here it is

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:sound file chosen for right sound
« Reply #7 on: 22 Jul 2005, 18:36:53 »
Quote
i know they use the string name but none of the assigned to it have the same name as the sound

wrong, they use an array of all the sound classnames defined in the ext file
then they select the one they want based on the posotion of whatever it is they're looking at (didn't read through the whole script)

for example:
_BigA = (_x / 1280) - ((_x / 1280) % 1)
_BigASay = (["Alpha","Bravo","Charlie","Delta","Echo","Foxtrot","Golf","Hotel","India","Juliet"] select _BigA)

alpha bravo etc are the classnames in the description.ext:
class Alpha
{
name = "";
sound[] = {"A_Alpha.ogg", db+0, 1.0};
titles[] = {0, $STRM_Alpha};
};


Offline 456820

  • Contributing Member
  • **
Re:sound file chosen for right sound
« Reply #8 on: 22 Jul 2005, 19:22:02 »
ahh i just looked at the sound files.
well ill have a go like that then thanks for your help now i just need the sound files