Jump to content

Recommended Posts

15 minutes ago, Quack Rejackt said:

sleep -;

 

So to sort this ,

you have add a trigger in the editor  and you have add this code ?

How exacly you do this ?

 

Do you have other scripts running ?

Have you enable to show the scripts error ?

Share this post


Link to post
Share on other sites

yes i have a civilian stood inside a trigger. if he moves out of it he gets shot. but because he is stood inside it the music file is played, but only once. and i need it to play for ever. i used - as a way of saying  x, 21, 25, 3600
and its immersion breaking if the rescue team can hear the sounds around the hostage when they are at the airport. so it has to 3d.

it can take a long time for players to set up and get the drones out and then transport the units to the ao. so the player playing as hostage will be in there for way over an hour. 1-4 hour game play. 

 

no there arnt any other scripts in this mission. not 3rd party scripts. i have things like !Alive; or what ever it is to trigger way points and tasks. but thats it.

yeah i get the black and white error messages on run or with some of my examples i get an error when the sound stops. but that was only when i was using sleep with out the.

while {true} do      part.
 

Share this post


Link to post
Share on other sites

try :

Name you Hostage in the editor and then add this in a .sqf and exec this

 

Not tested, it should work

Quack_Hostage_alive = true;

[] spawn {
	while {Quack_Hostage_alive} do {

	if (alive Quack_Hostage) then {
	
		tor1 say3D ["Music1", 1000, 3];
		sleep 21;
		Quack_Hostage_alive = true;
		}else{
		Quack_Hostage_alive = false;
		};		
};
};

if tort is the hostage then name Quack_Hostage , tort

Share this post


Link to post
Share on other sites

thanks :) , yeah he is called miller for now but it will be easier to change this. 

so by putting this in my init.sqf i wont even need a trigger ?

and it will allways play out of the object named tor1 ?

Share this post


Link to post
Share on other sites

Yes  the trigger is not needed in this case .

You can create a separate .sqf and

[]execVM "yourfile.sqf";

Share this post


Link to post
Share on other sites

no nothing played after using this.
 

Miller_alive = true;

[] spawn {
	while {Miller_alive} do {

	if (!alive Miller) then {
	
		tor1 say3D ["Music1", 1000, 3];
		sleep 21;
		Miller_alive = true;
		}else{
		Miller_alive = false;
		};		
};
};

 

Share this post


Link to post
Share on other sites
10 minutes ago, Quack Rejackt said:

if (!alive Miller)

 

Sorry delete the !

 

Miller_alive = true;

[] spawn {
	while {Miller_alive} do {

	if (alive Miller) then {
	
	hint"Miller_alive";
	
		tor1 say3D ["Music1", 1000, 3];
		sleep 3;
		Miller_alive = true;
		}else{
		hint"Miller is not alive";
		
		Miller_alive = false;
		};		
};
};

 

Share this post


Link to post
Share on other sites

Description
 

author = "Jackontakt";
OnLoadName = "Extrication & Elusion";
OnLoadMission = "VIP Extraction";
LoadScreen = "images\loadscreen.jpg";
overviewPicture = "images\loadscreen.jpg";


class CfgSounds
{
    sounds[]={};
 
    class Music1
    {
        name = "Music1";
        sound[] = {"\music\ee3.ogg", db+0, 1.0};
	titles[] = {0,""};
    };
    
};

__EXEC (MISSION_ROOT = __FILE__ select [0, count __FILE__ - 15])

init
 



player createDiaryRecord["Diary", ["IDAP Hostage", "Miller is dressed in white. Bring him to the airport terminal alive. <br/>


<img image='images\millerb.jpg' width='256' height='256'/>"]];


player createDiaryRecord["Diary", ["Location", "Eginio 115070 <br/><br/>


<img image='images\eg2.jpg' width='256' height=256'/> <br/> <img image='images\loc.jpg' width='256' height='256'/><img image='images\eg1.jpg' width='256' height='256'/>"]];


player createDiaryRecord["Diary", ["Hostage Extraction","A IDAP worker named Miller is being held Hostage in Eginio. Locate him, clear the area and bring him to the airport terminal alive. Namdar is also belived to be on site with the hostage in Eginio. You know what to do.

<img image='images\sit1.jpg' width='256' height='256'/>"]];


We need that hostage. Bring him back at all costs "]];



if (isServer) then {
_root = parsingNamespace getVariable "MISSION_ROOT";
_sound = _root + "music\ee3.ogg";
playSound3D [_sound, tor1, false, getPos tor1, 10, 1, 50];
};



MISSION_ROOT = call
{
	private _arr = toArray (str missionConfigFile);
	_arr resize (count _arr - 15);
	toString _arr
};


Miller_alive = true;

[] spawn {
	while {Miller_alive} do {

	if (alive Miller) then {
	
	hint"Miller_alive";
	
		tor1 say3D ["Music1", 1000, 3];
		sleep 3;
		Miller_alive = true;
		}else{
		hint"Miller is not alive";
		
		Miller_alive = false;
		};		
};
};

 

Share this post


Link to post
Share on other sites

 

author = "Jackontakt";
OnLoadName = "Extrication & Elusion";
OnLoadMission = "VIP Extraction";
LoadScreen = "images\loadscreen.jpg";
overviewPicture = "images\loadscreen.jpg";

class CfgSounds
{
	sounds[] = {};
		
	//adjust the volume from db0

	class Music1{name = "Music1";sound[] = {"music\ee3.ogg", db0, 1.0};titles[] = {};};

};

 

Create and add in the init.sqf

 

[] execVM "Diary.sqf";

player createDiaryRecord["Diary", ["Namdar","Namdar is a high value target. He is belived to be on site with the hostage in Eginio. You know what to do.  <br/>


<img image='images\nadarb.jpg' width='256' height='256'/>"]];


player createDiaryRecord["Diary", ["IDAP Hostage", "Miller is dressed in white. Bring him to the airport terminal alive. <br/>


<img image='images\millerb.jpg' width='256' height='256'/>"]];


player createDiaryRecord["Diary", ["Location", "Eginio 115070 <br/><br/>


<img image='images\eg2.jpg' width='256' height=256'/> <br/> <img image='images\loc.jpg' width='256' height='256'/><img image='images\eg1.jpg' width='256' height='256'/>"]];


player createDiaryRecord["Diary", ["Hostage Extraction","A IDAP worker named Miller is being held Hostage in Eginio. Locate him, clear the area and bring him to the airport terminal alive. Namdar is also belived to be on site with the hostage in Eginio. You know what to do.

<img image='images\sit1.jpg' width='256' height='256'/>"]];


We need that hostage. Bring him back at all costs "]];

 

[] execVM "Miller_alive.sqf";

Miller_alive = true;

[] spawn {
	while {Miller_alive} do {

	if (alive Miller) then {
	
	hint"Miller_alive";
	
		tor1 say3D ["Music1", 1000, 3];
		sleep 3;
		Miller_alive = true;
		}else{
		hint"Miller is not alive";
		
		Miller_alive = false;
		};		
};
};

 

Share this post


Link to post
Share on other sites
1 minute ago, GEORGE FLOROS GR said:

We need that hostage. Bring him back at all costs "]];

 

this is an error also

  • Thanks 1

Share this post


Link to post
Share on other sites

Do you mean a notification that the loop is made ?

Icon like an image on screen?

 

Share this post


Link to post
Share on other sites

yes an icon / checkbox next to the play icon in the music section of the trigger. so you can loop and music, sfx, environment sound with the click of a button ?

hang on iv made my new documents, im just going to run the mission.

Share this post


Link to post
Share on other sites
2 minutes ago, Quack Rejackt said:

checkbox next to the play icon in the music section of the trigger

 

To be honest i'm not editing anything with the 3d editor , so actually , i don't have any idea !

Share this post


Link to post
Share on other sites

did you forgot the }; ?

 

class CfgSounds
{
	sounds[] = {};
		
	//adjust the volume from db0

	class Music1{name = "Music1";sound[] = {"music\ee3.ogg", db0, 1.0};titles[] = {};};

};

 

Do you edit with something like notepad++ ?

 

notepad++
https://notepad-plus-plus.org/

and also use the extra pluggins
(this way will be better , it will give also some certain colors to be able to detect ex. problems )
http://www.armaholic.com/page.php?id=8680

Share this post


Link to post
Share on other sites

it says support module , that you might be using in the editor ? but i can't tell you about this.

Share this post


Link to post
Share on other sites

init
 

author = "Jackontakt";
OnLoadName = "Extrication & Elusion";
OnLoadMission = "VIP Extraction";
LoadScreen = "images\loadscreen.jpg";
overviewPicture = "images\loadscreen.jpg";

class CfgSounds
{
	sounds[] = {};
		
	//adjust the volume from db0

	class Music1{name = "Music1";sound[] = {"music\ee3.ogg", db0, 1.0};titles[] = {};};

};

description
 

author = "Jackontakt";
OnLoadName = "Extrication & Elusion";
OnLoadMission = "VIP Extraction";
LoadScreen = "images\loadscreen.jpg";
overviewPicture = "images\loadscreen.jpg";


class CfgSounds
{
    sounds[]={};
 
    class Music1
    {
        name = "Music1";
        sound[] = {"\music\ee3.ogg", db+0, 1.0};
	titles[] = {0,""};
    };
    
};


Diary
 

player createDiaryRecord["Diary", ["Namdar","Namdar is a high value target. He is belived to be on site with the hostage in Eginio. You know what to do.  <br/>


<img image='images\nadarb.jpg' width='256' height='256'/>"]];


player createDiaryRecord["Diary", ["IDAP Hostage", "Miller is dressed in white. Bring him to the airport terminal alive. <br/>


<img image='images\millerb.jpg' width='256' height='256'/>"]];


player createDiaryRecord["Diary", ["Location", "Eginio 115070 <br/><br/>


<img image='images\eg2.jpg' width='256' height=256'/> <br/> <img image='images\loc.jpg' width='256' height='256'/><img image='images\eg1.jpg' width='256' height='256'/>"]];


player createDiaryRecord["Diary", ["Hostage Extraction","A IDAP worker named Miller is being held Hostage in Eginio. Locate him, clear the area and bring him to the airport terminal alive. Namdar is also belived to be on site with the hostage in Eginio. You know what to do.

<img image='images\sit1.jpg' width='256' height='256'/>"]];


We need that hostage. Bring him back at all costs "]];

Miller_alive
 

Miller_alive = true;

[] spawn {
	while {Miller_alive} do {

	if (alive Miller) then {
	
	hint"Miller_alive";
	
		tor1 say3D ["Music1", 1000, 3];
		sleep 3;
		Miller_alive = true;
		}else{
		hint"Miller is not alive";
		
		Miller_alive = false;
		};		
};
};

 

Share this post


Link to post
Share on other sites

I 'm starting feeling like Dazy duck in your avatar picture !

 

So ,

in the Description ext:.

author = "Jackontakt";
OnLoadName = "Extrication & Elusion";
OnLoadMission = "VIP Extraction";
LoadScreen = "images\loadscreen.jpg";
overviewPicture = "images\loadscreen.jpg";

class CfgSounds
{
	sounds[] = {};
		
	//adjust the volume from db0

	class Music1{name = "Music1";sound[] = {"music\ee3.ogg", db0, 1.0};titles[] = {};};

};

 

in the init.sqf

[] execVM "Diary.sqf"; 
[] execVM "Miller_alive.sqf"; 

 

Create:

[] execVM "Diary.sqf";

player createDiaryRecord["Diary", 
["Namdar","Namdar is a high value target. He is belived to be on site with the hostage in Eginio. You know what to do.<br/>
<img image='images\nadarb.jpg' width='256' height='256'/>"]];

player createDiaryRecord["Diary", [
"IDAP Hostage", "Miller is dressed in white. Bring him to the airport terminal alive. <br/>
<img image='images\millerb.jpg' width='256' height='256'/>"]];

player createDiaryRecord["Diary", ["Location", "Eginio 115070 <br/><br/>
<img image='images\eg2.jpg' width='256' height=256'/> <br/> 
<img image='images\loc.jpg' width='256' height='256'/><img image='images\eg1.jpg' width='256' height='256'/>"]];

player createDiaryRecord["Diary", ["Hostage Extraction",
"A IDAP worker named Miller is being held Hostage in Eginio. 
Locate him, clear the area and bring him to the airport terminal alive. 
Namdar is also belived to be on site with the hostage in Eginio. You know what to do.
<img image='images\sit1.jpg' width='256' height='256'/>"]];
We need that hostage. Bring him back at all costs "]];

add this somewhere or fix ,  because it's an error.

 

 

 

Create:

[] execVM "Miller_alive.sqf";

Miller_alive = true;

[] spawn {
	while {Miller_alive} do {

	if (alive Miller) then {
	
	hint"Miller_alive";
	
		tor1 say3D ["Music1", 1000, 3];
		sleep 3;
		Miller_alive = true;
		}else{
		hint"Miller is not alive";
		
		Miller_alive = false;
		};		
};
};

 

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

×