Home   Help Search Login Register  

Author Topic: trigger setMusicEffect  (Read 1126 times)

0 Members and 1 Guest are viewing this topic.

Offline CrazyAce

  • Members
  • *
trigger setMusicEffect
« 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?

Offline Odin

  • Members
  • *
Re: trigger setMusicEffect
« Reply #1 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


Offline CrazyAce

  • Members
  • *
Re: trigger setMusicEffect
« Reply #2 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:
« Last Edit: 24 Aug 2008, 07:28:48 by CrazyAce »

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: trigger setMusicEffect
« Reply #3 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


Planck
I know a little about a lot, and a lot about a little.