Jump to content
Sign in to follow this  
hridaysabz

Using Say3D

Recommended Posts

Hey guys, I'm back with 2 questions.

1. I'm making a mission where I have this code in a trigger:

[Miller, SL] say3D "Miller1direct";       
[sL, Miller] say3D "sql5direct";       
[Miller, SL] say3D "Miller2direct"; 

Now what I'm looking for is 10 second breaks between the three sentences. How would I do this? If by script, please show me exactly how. Also, how does Bohemia make their characters talk in direct chat with voice and text(in the radio chat for direct)?

2. I want my units to wait at a waypoint for 30 seconds and then move to the next move waypoint.

Thanks.

Share this post


Link to post
Share on other sites

Rather than a code in a trigger i would make a small script to to be called on the way point or trigger and then you all you need to do is add sleep 10; between the different say3D lines. But you would need to take into account how long what they are saying actually lasts. So if what hes saying is 10 seconds and then you want a 10 second pause and then the next line to begin it would be sleep 20;. Maybe that would work :P I'm no expert.

For the waiting at the way point just look on the left side when you make the way point and there is a choice for countdown or timeout, just put 30 in all the boxes and i believe that will do the job for you.

Share this post


Link to post
Share on other sites

I'm trying to make a soundbot in-game and I haven't found anyone who made something like this before. I'm a noob when it comes to scripting, but really need help to make this one. Hope you guys can help me.

- This script is only an example from arma 2 - Radio and loudspeaker script.

Concept:

You go to a table choose a song, pay 20000 and the song will play by using say3d, so everyone in a certain area can hear it.

http://i.imgur.com/aZUo7Nz.jpg (672 kB)

soundbot

_store = SoundBot;

_denied1 = false;

_price = 20000;

if(life_cash < _price) exitWith {hint "You do not have enough money to play the song! You need atleast $20000 or the soundbot won't sing";};

life_cash = life_cash - _price;

removeAllActions soundbot;

while {true} do

{

//Timer display (TO BE REPLACED WITH A NICE GUI LAYER)

track1 = true;

publicVariable "track1";

sleep 1;

track1 = false;

publicVariable "track1";

sleep 171;

deleteVehicle radio_H;

};

track1

radio_H = "HeliHEmpty" createVehicle (position soundbot);

radio_H attachTo [soundbot,[0,0,0]];

if (local player) then {

radio_H say3D ["track1",1,1];

};

description

class CfgSounds

{

sounds[] = {};

class track1

{

name="track1";

sound[]={"sounds\track1.ogg",db-5,1.0};

titles[]={};

};

};

init

playlist_started = true;

publicVariable "playlist_started";

Edited by MartinPC4K

Share this post


Link to post
Share on other sites

I have a simple script for this I use called "delay_say.sqf". Make a text file with this name, and put this in it:

// "delaySay.sqf";
// dummy= [man, 3, "sound","chat text"] execVM "delaySay.sqf"
// Man will say sound after delay (in seconds);

private ["_man", "_delay","_sound"];

_man =   _this select 0;
_delay = _this select 1;
_sound = _this select 2;
_text  = _this select 3;

//_str_sound = "STR_" + _sound;
sleep _delay;
_man say3d _sound;
hintsilent composeText [parsetext format["<t size='1' align='center' color='#00FF00'>%1</t>",_text]]; 

Put this line in your trigger:

dummy= [man, 3, "sound","chat text"] execVM "delaySay.sqf"

Share this post


Link to post
Share on other sites
I have a simple script for this I use called "delay_say.sqf". Make a text file with this name, and put this in it:

// "delaySay.sqf";
// dummy= [man, 3, "sound","chat text"] execVM "delaySay.sqf"
// Man will say sound after delay (in seconds);

private ["_man", "_delay","_sound"];

_man =   _this select 0;
_delay = _this select 1;
_sound = _this select 2;
_text  = _this select 3;

//_str_sound = "STR_" + _sound;
sleep _delay;
_man say3d _sound;
hintsilent composeText [parsetext format["<t size='1' align='center' color='#00FF00'>%1</t>",_text]]; 

Put this line in your trigger:

dummy= [man, 3, "sound","chat text"] execVM "delaySay.sqf"

- Problem about this script is that is a trigger which is okay, but I need some kind of "addaction" to put in a object... I walk to a object, pay 20.000 cash and the object will addaction to trigger the trigger so it will play a sound/song.

Share this post


Link to post
Share on other sites
- Problem about this script is that is a trigger which is okay, but I need some kind of "addaction" to put in a object... I walk to a object, pay 20.000 cash and the object will addaction to trigger the trigger so it will play a sound/song.

I believe that that piece of code was to assist me.

Share this post


Link to post
Share on other sites
I'm a really dummy when it comes to scripts, so I'm sry about that.

No worries, we're all learning, aren't we?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×