Forum Jump :

Author Message


Posts: 2
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2014-07-18 10:39        
     
So, I've recently watched a tutorial on adding custom music into Arma 3 at certain triggers
(In this case, when I get in a car.)
It works just fine.
My problem?
I don't know how to turn it off when I leave the vehicle-_-

What I've done so far:

|Saved a new editor mission|

|Made folder called "music" in the mission folder.|

|Converted desired file to .ogg format, and renamed it "music1"|

|Made a "description.ext" in the mission folder.|

|Put this script into the description file|

class CfgMusic
{
tracks[]={music1};

class track1

{ name = "music1"; sound[] = {\music\music1.ogg, db+10, 1.0};
};


|In the editor, I created a player.|

|I also created a vehicle, and named it "car"|

|I created a trigger.|

|In the Condition box, I typed "(player in car)"|

|In the On ACT box, I put "playMusic "track1";|


This makes my song play once I enter the vehicle.
However, I want the music to stop when I get out of the vehicle.


If anyone can tell me how to do that, I would greatly appreciate it, and you will get a nod in my manifesto XD


Author Message


Posts: 1189
Rank:


Level: Member

Country: tr
Location:
Occupation: Computer Science student
Age: 23
In-game name: Wak

 
#2 Posted at 2014-07-18 10:49        
     
You can't make the music to stop (I know, weird). But you can totally mute it down to 0 with fadeMusic!

Sometimes I like to think as I started the whole "earplugs" thing.

W0lle: The only advice I can give you is: Do not try to understand BI. You will not succeed and it only makes your brain go boom. I would even go so far and say that not even they understand their own actions :-D.

#define getDamage getDammage

Advertisement


Author Message


Posts: 2
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#3 Posted at 2014-07-18 11:15        
     
# 654wak654 : You can't make the music to stop (I know, weird). But you can totally mute it down to 0 with fadeMusic!

That's peculiar.

What kind of trigger would I use to fade out the music?
I already tried making one where the condition is
"!(player in car)"

and then on ACT
"1 fadeMusic 0"

The music is still playing when I leave the vehicle.


Author Message


Posts: 23
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#4 Posted at 2014-07-30 20:08        
     
did you get an answer on this one as i am trying to do the same thing? thanks.


Author Message


Posts: 3
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age: 39
In-game name:

 
#5 Posted at 2014-08-01 17:56        
     
I think I figured this out.

I was using zoned triggers so when I went in the zone it triggered the music, I also could not get it to stop.

So I created another trigger exactly the same size, changing the parameter from "Present" to "not present", in the act field I had "1 fademusic 0;" lined it up exactly with the play music trigger and hey presto the music stopped when I exited the zone.


Hope this helps

Added 4 minutes later:

So in the case of a "player in car" trigger you would want a second one that is "player not in car" or something


Author Message


Posts: 250
Rank:


Level: Member

Country: ca
Location:
Occupation:
Age:
In-game name: austinXmedic

 
#6 Posted at 2014-08-01 20:07        
     
wouldn't
playmusic "";
stop it from playing? I know in Zeus it does.

Some of my work:
http://steamcommunity.com/sharedfiles/filedetails/?id=287343671 -- Unit Play/ Unit Capture Functions Guide
http://steamcommunity.com/sharedfiles/filedetails/?id=265454265 -- Zeus Guide
add me on steam: austin_medic