ID:176032
 
Basically Ive made a turf to play a certain midi file stored in the games folder. The music plays, only problem is that the turf is acting as though density is set to 1 wen I have set it to 0. This is what it looks like:

turf
grass2
icon='grass.dmi'
icon_state = "2"
density = 0
Enter()
usr << sound("crono_town.mid",1)
I shall follow in the footsteps of my hero lummox.

For starters: Duh!

Second. Never use usr in Enter/Entered/Exit/Exited.

<font size = 55>Duh!</font>

turf
grass2
icon='grass.dmi'
icon_state = "2"
density = 0
Entered(mob/M)
if(ismob(M))
M << sound("crono_town.mid",1)
..()

Siientx

In response to Siientx
<font size = 7> Duh!</font> learn how to use font tags.....
In response to JimmyWimmy
Study the word typo 500 times.


Siientx
In response to Siientx
Try putting
return..()
at the end.

And spell font properly.

<font size=50>Duh!</font>
In response to Hazman
Return ..() would make it do nothing. Just ..() is fine.

Siientx
In response to Siientx
Hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm....... OH YEAH! I forgot about that =D Goes to show I have the memory of a Goldfish
Aside from not using usr in Enter(),Entered(),Exit(),Exited(), you should note that Enter() is called when you try to enter a turf. You should use Entered() since that is called after you succesfully enter a turf.

turf
grass2
icon='grass.dmi'
icon_state = "2"
density = 0
Entered(atom/A) //A is the thing that entered the turf
if(ismob(A)) //Check to see if it's a mob
var/mob/M = A //Type cast to a mob
M << sound("crono_town.mid",1) //Send the sound to M, not usr