Heres what i did:
turf/grass
name = "Grass"
icon = 'Landscapes.dmi'
icon_state = "grass"
Entered()
view(src)<<"usr = [usr], src = [src]" //To show the grass and entered for testing only.
if(istype(usr,/obj/SandWave)) //usr is person(or object) entered
flick("sand",src) //src is the grass
else
view(src)<<"Aww" //Just to test.
Whenever i, myself went in, the usr came as me.
But when i sent the obj in, the usr was 0(null).
How would i fix it to know when the Sandwave is comeing?(Replaceing 0 with sandwave)
And only for sandwave nothing else.
Then you can run istype() and ismob()/isobj() etc checks.
If you later want to actually use the obj, it's probably worth doing var/obj/O = A after if(istype()) because that gives you access to the obj variables.
I would recommend looking up what usr is, you seem to be confused.