ID:160454
 
ok I want to make it so when you enter or exit the area that the music will change and I'm at a loss right now.

Here is what I have so far
if(/area/music_change_location/ruinedarea) party<<sound(null)<<sound (MUSIC_SAD,1)
if(/area/music_change_location/worldmap) party<<sound(null)<<sound (MUSIC_WORLDMAP,1)


music_change_location
ruinedarea/desc="Ruined Area"
worldmap/desc="World Map"


I just want it as a simple area change and can't for the life of me figure it out. Enter area play MUSIC_SAD Exit area play MUSIC_WORLDMAP

and I want all of this without a warp. Warping I have figured out, but without a warp it troubles me, and I can't think of how to place it.
mna you are missing out on so much lol need alot more work to it so im not really gonna help altho since im lazy if you want i can give you someting way more simple and sloppy that would work ok>?
In response to Opop1
alright lets see it
In response to ForsakenSoul
dm<map1to2
turf
all
cave
door1
icon = 'mapstuff.dmi'
icon_state = "portal"
Entered(mob/M)
if(istype(M,/mob))//is it a mob that entered?
M<<sound(null)
M<<sound('soecol1.mid',repeat=1)
M.loc=locate(4,88,1)//if it is a mob move it to the x,y,z coordinates
name = "house"
door2
icon = 'mapstuff.dmi'
icon_state = "portal2"
Entered(mob/M)
if(istype(M,/mob))//is it a mob that entered?
M<<sound(null)
M<<sound('soecol1.mid',repeat=1)
M.loc=locate(4,2,1)//if it is a mob move it to the x,y,z coordinates>dm
In response to Opop1
if you cant uderstand that stuff u shouldnt code and they way u was working on with your code was gonna overlap
In response to Opop1
I know how to do it with a warp.

I want it to work without warping the person. Basically I want them to walk over it and the music will play, and when they exit the world music will play.
look up the sound procs in the DM reference and read about them. What you should attempt to do is stop any playing music when you enter and/or leave an area then have it play the new music. No if-then statements.
In response to ForsakenSoul
ima cry lol i dont really wanna go thro the drama but add me on msn and ill help
[email protected]
sound proc
    sound(file,repeat=0,wait,channel,volume) 
(supports named arguments)




repeat var
     repeat=1


volume var (-100 to 100)
     volume=50


Final Product
     usr << sound('boom.wav', volume=50,repeat=0)
//or...
usr << sound('ForestSong.wav', volume=25,repeat=1)//as 'background music.' It would repeat untill stopped.
sleep(600)//let it repeat for a minute
M<<sound(null)//make it shut the f*** up xD


ForsakenSoul wrote:
ok I want to make it so when you enter or exit the area that the music will change and I'm at a loss right now.

I just want it as a simple area change and can't for the life of me figure it out. Enter area play MUSIC_SAD Exit area play MUSIC_WORLDMAP

and I want all of this without a warp. Warping I have figured out, but without a warp it troubles me, and I can't think of how to place it.

It's almost the exact same as warping... except without the warp. You can also control what direction you want the player to face to play the music.

area/Music_Transitions
RuinedArea
Exited(mob/M)
switch(M.dir)
if(NORTH) M<<sound(MUSIC_SAD,1)
/*This makes it so if the player exits the tile while facing north, the player will receive this sound
(assuming the Ruined Area is to the north)*/

if(SOUTH) M<<sound(MUSIC_WORLDMAP,1)
/*This makes it so if the player ecits the tile while facing south, the player will receive this sound
(assuming the world map is to the south)*/

return ..()


The reason why I use Exited() is because you'll get some music problems if you use Entered() alone (unless you also use Exited() to counter this).
In response to Mega fart cannon
ok it works, but music overlaps. Trying to figure out where to put the sound(null)
In response to ForsakenSoul
Just set a channel. By default, the sound() proc searches for a channel that's not in use.

Another way you can pull this off is by pre-setting your variables in a /sound datum. That way, you don't need to worry about not setting the right flags in every single sound() proc.

Background_Music
parent_type = /sound
volume = 75
environment = -1
channel = 2
repeat = 1

mob/Login()
src << new/Background_Music('file.it')
In response to Mega fart cannon
I just want to stick to the sound(null) seeing that this is the last of my music problems.
In response to ForsakenSoul
ok I fixed it...

had to do it for four sides so it worked how I wanted, but here is the final for it...

area/Music_Transitions
RuinedAreaE
Exited(mob/M)
switch(M.dir)
if(EAST){M<<sound(null); M<<sound(MUSIC_SAD,1)}
/*This makes it so if the player exits the tile while facing north, the player will receive this sound
(assuming the Ruined Area is to the north)*/

if(WEST){M<<sound(null); M<<sound(MUSIC_WORLDMAP,1)}
/*This makes it so if the player ecits the tile while facing south, the player will receive this sound
(assuming the world map is to the south)*/

return ..()
area/Music_Transitions
RuinedAreaS
Exited(mob/M)
switch(M.dir)
if(SOUTH){M<<sound(null); M<<sound(MUSIC_SAD,1)}
/*This makes it so if the player exits the tile while facing north, the player will receive this sound
(assuming the Ruined Area is to the north)*/

if(NORTH){M<<sound(null); M<<sound(MUSIC_WORLDMAP,1)}
/*This makes it so if the player ecits the tile while facing south, the player will receive this sound
(assuming the world map is to the south)*/

return ..()
area/Music_Transitions
RuinedAreaW
Exited(mob/M)
switch(M.dir)
if(WEST){M<<sound(null); M<<sound(MUSIC_SAD,1)}
/*This makes it so if the player exits the tile while facing north, the player will receive this sound
(assuming the Ruined Area is to the north)*/

if(EAST){M<<sound(null); M<<sound(MUSIC_WORLDMAP,1)}
/*This makes it so if the player ecits the tile while facing south, the player will receive this sound
(assuming the world map is to the south)*/

return ..()


Thanxz for all your help... Without the codes provide I would of never figured it out till later on.