Water
icon_state = "watermovement"
density = 1
Entered(obj/a)
var/L = new/obj/Trail
if(istype(a,/obj/projectile))
src.overlays += L
L.dir=a.dir
spawn(10)
src.overlays -= L
return 1
else
if(usr.icon_state == "fly")
return 1
else
return 0
Problem description:
Were it says "L.dir=usr.dir" it is not working.
It tells me:
Turf.dm:234:error:L.dir:undefined var
Heh, that's because you aren't thinking logically. You adding an instance of an object to the overlays, and then using a silly, illogical method of removal. This method of removal is however, flawed by the fact that you are removing a prototype instead of the actual instance.
Now, if I may show you another method of doing the same that is 1) quite logical, and 2) quite elegant.
(May I also point out that use of usr in this proc will cause you some headaches. Allow me to show you a much more correct way of managing this.)
I will make a second post showing another method of doing this with an even more logical approach.
To answer your new question:
This line is the problem.
It's an issue of type-casting, type casting is a way of telling the game what kind of variable "L" is. In this case it's an /obj/Trail. You need to define it as such.
Honestly, you need to do some serious work on your basic programming skill. These threads you have posted the last few days could have been answered with the first chapter of any beginning programming book.
Often these kinds of issues show a lack of actual study (or thought).