turf/zlegendshouse
Enter(atom/movable/A)
if(ismob(A))
var/mob/M=A
if(M.client && M.client.ckey=="zlegend2")
usr << 'fireworks.mid'
usr << sound('fireworks.mid',1)
return 1
else
return 0
return..()
when u step on the turf, music begins. If you step on it again, it gets overridden by the same music. Is there any way to fix this problem?
ID:176517
Jan 6 2003, 10:08 am
|
|
Jan 6 2003, 10:30 am
|
|
When you leave the turf, Exit() maybe? Just stop the sound from playing.
|
Format:
sound(file,repeat=0,wait,channel) (supports named arguments) Args: file: A sound file to play. repeat: 1 to play sound repeatedly. wait: 0 to interrupt current sound on channel; 1 to wait in queue channel: 0 for any available channel, 1-8 for specific channel (wavs only) From the Dream makers help menu, in the furture try to look up infomation before asking it online. Just press F1 in Dream Maker to pop up this menu, and if you have your curser over the needed area, it will auto look up that proc. |
In response to Scoobert
|
|
The first time the player enters that turf the music starts, interrupting whatever is playing. When they leave the turf the music continues to play, but when they enter the turf again, the music interrupts again, thus starting over. That's what I've gathered from Zlegend's post. Try reading the person's problem next time.
Zlegend, if you have the song repeating, you just need another var for the player. That var will determine if that song is playing or not. When they enter that turf, check that var. If it's, for example, zero, then play the song and set it to one. If it is one, the song is already playing. If you have the music changed elsewhere, you would have to reset that var to zero, so the next time the player enters that turf that music will play. |
In response to OneFishDown
|
|
I glanced over it, and i guess i didnt read it good the first time, your right, a var will work, or is there a way to check which song is playing?
|
Zlegend2 wrote:
turf/zlegendshouse I'd ignore that problem and concentrate on the much worse ones you have yet to fix, like still putting usr in movement procs. Gads. That would be M, not usr. But the lines that play the sound (the first one is totally pointless because of the second, BTW) really belong more properly in Entered(), not in Enter(). Lummox JR |
Zlegend2 wrote:
turf/zlegendshouse Set the >('fireworks.mid',1) to 0. >('fireworks.mid',0) |
Zlegend2 wrote:
turf/zlegendshouse just take out the ,1 in ('fireworks.mid',1) also, why do you have usr << 'fireworks.mid' in there? turf/zlegendshouse |