Home   Help Search Login Register  

Author Topic: Question regarding custom sounds...  (Read 2281 times)

0 Members and 1 Guest are viewing this topic.

Offline ahmed117

  • Members
  • *
  • The 3d!t0R -=I.S.I=-
Question regarding custom sounds...
« on: 14 Dec 2011, 15:34:02 »
Hello fellas,
              I am suffering with another problem regarding the custom sounds.Let me tell you the whole story: I recorded 3 .wav sounds, with all the rules.Then I converted them in .ogg and .lip from Sound Lab.I had prepared a mission of desert island, with 3 characters.I pasted all those sound files I just recorded in the mission folder with description.ext; I put a trigger on the map with the code:

unit_name say ["my file name",1]

similarly I put 3 triggers, each trigger was representing each sound. But the problem is that characters are speaking continuously, I want them to wait for each other, one should speak after other. For this I tried to put some Count down number but still the sometime cross their speaking time limits.

In short fellas, I wanna know how can I time custom sounds???? please help me..


Regards:
Ahmed Azher (A.Rogers)
The 3d!t0R            -=O.F.P.E.C=-                                                         -=I.S.I=-

Offline Gruntage

  • Missions Depot
  • Administrator
  • *****
  • How do I get outta this chickensh*t outfit?
Re: Question regarding custom sounds...
« Reply #1 on: 14 Dec 2011, 15:43:51 »
The best solution would be to create a script like this one:

Code: [Select]
person1 say "clip1"

~5

person2 say "clip2"

~8

person3 say "clip3"

exit

where '5' and '8' are the durations between each sound clip.

This is the simplest way of doing it. You could try using game logics with 'AND' waypoints assigned. The CWA campaigns used Game logics to play radio sound clips straight after each other. It's possible that it can work for the 'say' command also.



"But one thing I can tell you from not just OFP but life in general:  criticism is directly proportional to quality. The more criticism a mission receives, the better the outcome" - macguba

Offline ahmed117

  • Members
  • *
  • The 3d!t0R -=I.S.I=-
Re: Question regarding custom sounds...
« Reply #2 on: 14 Dec 2011, 16:24:50 »
SO sir, How to use this script?? where to type it.? cuz I don't know.. :dunno:
The 3d!t0R            -=O.F.P.E.C=-                                                         -=I.S.I=-

Offline Gruntage

  • Missions Depot
  • Administrator
  • *****
  • How do I get outta this chickensh*t outfit?
Re: Question regarding custom sounds...
« Reply #3 on: 14 Dec 2011, 16:29:14 »
Oops yeah sorry I forgot to mention that...

When you want to call this script you just use [] exec "nameofscript.sqs"

You can do this through a trigger by putting the above in the On Activation field. You could also call it by putting
Code: [Select]
player exec "nameofscript.sqs"
Hope that answers your question

Gruntage
« Last Edit: 14 Dec 2011, 22:54:38 by savedbygrace »
"But one thing I can tell you from not just OFP but life in general:  criticism is directly proportional to quality. The more criticism a mission receives, the better the outcome" - macguba

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Question regarding custom sounds...
« Reply #4 on: 14 Dec 2011, 22:54:15 »
To prevent confusion, it's best to put simple commands into either bold or inside code brackets. Some may mistake the single quote as a part of the code.

Offline Aldo15

  • OFP-addict
  • Former Staff
  • ****
    • My OFP missions
Re: Question regarding custom sounds...
« Reply #5 on: 15 Dec 2011, 00:06:13 »
But I don't think so a script be necessary. Just add some game logics in your map, with some waypoint with its necessary time.

For example add a waypoint type "and" to a game logic, and on activation put unit say "sound_1". See the picture.
My OFP stuff
FMF Project by Aldo15. Coming soon.
If in the high school or university, Teachers add a new subject about how to make scripts, missions, for ofp. I'd be number one of my classroom

Offline ahmed117

  • Members
  • *
  • The 3d!t0R -=I.S.I=-
Re: Question regarding custom sounds...
« Reply #6 on: 16 Dec 2011, 08:32:37 »
Yes...I got it... Thank you guys...!! But I have another different, Sorry guys I am kinda disturbing you but, I am ask these question Cuz I am about to submit my first mission. Namely "The Border Assault". The Question Is That how to deactivate a trigger? Example: A trigger is playing anonymous sounds in effect, we are moving to another place away from the trigger, So I want that trigger to deactivate when we move away from that trigger. Is there way to do this...please please answer another question... :D
« Last Edit: 16 Dec 2011, 08:51:57 by ahmed117 »
The 3d!t0R            -=O.F.P.E.C=-                                                         -=I.S.I=-

Offline Gruntage

  • Missions Depot
  • Administrator
  • *****
  • How do I get outta this chickensh*t outfit?
Re: Question regarding custom sounds...
« Reply #7 on: 16 Dec 2011, 09:17:06 »
Hmm do you want the trigger to be in use later in the mission? If not, then you could simply delete the trigger after it's been used. To do this, simply give the trigger a name, and then use the following:

Code: [Select]
DeleteVehicle Trig1
Where 'trig1' is the name of the trigger. You can put this code in another trigger, waypoint or script.

The above method is very useful for decreasing processor speed when a lengthy mission is being played.
« Last Edit: 16 Dec 2011, 09:18:49 by Gruntage »
"But one thing I can tell you from not just OFP but life in general:  criticism is directly proportional to quality. The more criticism a mission receives, the better the outcome" - macguba

Offline ahmed117

  • Members
  • *
  • The 3d!t0R -=I.S.I=-
Re: Question regarding custom sounds...
« Reply #8 on: 16 Dec 2011, 14:42:11 »
During talking face to face of characters, my characters are not looking at each other, so, how can I make my characters look at each other during talking?
The 3d!t0R            -=O.F.P.E.C=-                                                         -=I.S.I=-

Offline Gruntage

  • Missions Depot
  • Administrator
  • *****
  • How do I get outta this chickensh*t outfit?
Re: Question regarding custom sounds...
« Reply #9 on: 16 Dec 2011, 16:11:03 »
By using the 'dowatch' command:

Code: [Select]
person1 dowatch person2
Where 'person1' and 'person2' are the names of those involved in the script.
"But one thing I can tell you from not just OFP but life in general:  criticism is directly proportional to quality. The more criticism a mission receives, the better the outcome" - macguba

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Question regarding custom sounds...
« Reply #10 on: 16 Dec 2011, 23:10:14 »
In the future, please ask separate questions in there own threads, after you have exhausted your search. Then make sure the title of the thread is specific to what you're asking.

If you plan on using the trigger repeatedly, just use a global variable in the condition field that is controlled by other sources.

Regarding looking at each other, sometimes the AI looks at the units position(which is to say at his feet). It may be helpful to have the unit look at an object and then position that object off screen behind the target unit at a distance that causes the watching unit to incline his head to look at the watched unit's face.

Try sifting through the comref to familiarize yourself with BIS title commands.