OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: CrazyAce on 24 Aug 2008, 00:38:31

Title: trigger setMusicEffect
Post by: CrazyAce on 24 Aug 2008, 00:38:31
What I'm wanting to do is have a trigger that triggers music to be played when a player is in the trigger radius. As an example when the player is near a building, the trigger starts to play music or a sound effect then fades off as the player moves away from the building. In the COMREF a few codes can be used except so far nothing is working, what would I need to do to make this happen?
Title: Re: trigger setMusicEffect
Post by: Odin on 24 Aug 2008, 03:31:38
G'day mate,

you could try this way in your trigger

Repeatedly

on act
Code: [Select]
playmusic ["JokerandTheThief", 0]; 1 fadeMusic 1on dea
Code: [Select]
5 fadeMusic 0
Odin

Title: Re: trigger setMusicEffect
Post by: CrazyAce on 24 Aug 2008, 05:51:00
Dude that is perfect :clap: I tried searching the forums for something like this, but wasn't able to get anything relevant with the search terms trigger,music.

Thanx bud.

:edit:

Hu... This is strange. I get "BuildingMusic" not found error message... I placed the *.ogg file in the mission sound folder and just for the heck of it I also made it into a *.wav and *.mp3 :scratch:
Title: Re: trigger setMusicEffect
Post by: Planck on 24 Aug 2008, 11:07:24
Did you add the music to the description.ext file in class cfgMusic?

Have a look also at the Editors Depot for some tuts on the subject.

For example: Here (http://www.ofpec.com/ed_depot/index.php?action=details&id=55&page=1&cat=xyz)


Planck