OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: ahmed117 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 best solution would be to create a script like this one:
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.
-
SO sir, How to use this script?? where to type it.? cuz I don't know.. :dunno:
-
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 player exec "nameofscript.sqs"
Hope that answers your question
Gruntage
-
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.
-
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.
-
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
-
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:
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.
-
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?
-
By using the 'dowatch' command:
person1 dowatch person2
Where 'person1' and 'person2' are the names of those involved in the script.
-
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 (http://www.ofpec.com/COMREF/) to familiarize yourself with BIS title commands.