ID:157677
 
I want to make a water splashing overlay appear when I step on a water turf, how would I go about doing this? I also want to create a reflection of the mob on the warer, if somebody could give me an example or a resource for that it would be very useful, and thanks!
Bump. What I am asking is how do I preform an action if I walk onto a turf, and I have an idea already of how I would do the reflection.

Another question. I tried to use a demo popisfizzy supplied to me for placing an object on a spot and it didn't work. Nothing happened. Here it is:

mob
var/atom/to_place// The object to be placed is assigned
// here. Create it, but don't put it
// on the map.

verb
PlaceRedBall()
// Create a red ball obj and assign it to the
// variable, but, as I said above, don't assign
// it to a location on the map.
to_place = new /obj/red_ball
PlaceBlueBall()
// Same as above with a blue ball.
to_place = new /obj/blue_ball
world
view = 7
turf

Click(mob/M)
if(istype(M))
if(usr.to_place)
var/obj/red_ball/R = new(null, src)
R.loc = locate(M.to_place)
// if(usr.to_place)
// to_place
// to_place.loc = locate(src.x, src.y, src.z)
// If the usr who clicked is supposed to place
// something, place it in this location.
// to_place.loc = src
// usr.to_place = src
// src.to_place = loc

grass
icon = 'grass.dmi'

obj
red_ball
icon = 'grass.dmi'
icon_state = "red"
obj
blue_ball
Look up Entered() and Exited() in the reference.
In response to Darkjohn66
Probably because that's barely at all what my code was.
In response to Popisfizzy
Ha...ha... I have no idea whether I deleted something or I didn't notice the edit 0_0.
In response to Darkjohn66
Both, more-than-likely.
In response to Popisfizzy
mob
var/atom/to_place // The object to be placed is assigned
// here. Create it, but don't put it
// on the map.

proc
PlaceAtom(atom/loc)
to_place.loc = loc
to_place = null

ShouldPlace(turf/loc)
if(!to_place)
return 0

// This keeps the thing from being placed on a
// dense location. Modify it for other constraints.
if(loc.loc.density)
// The loc of a turf is an area.
return 0
if(loc.density)
return 0
for(var/atom/movable/m in contents)
return 0

// If it's not dense and has nothing dense on
// it, allow it to be placed.
return 1

verb
PlaceRedBall()
// Create a red ball obj and assign it to the
// variable, but, as I said above, don't assign
// it to a location on the map.
to_place = new /obj/red_ball
PlaceBlueBall()
// Same as above with a blue ball.
to_place = new /obj/blue_ball
obj
blue_ball
red_ball
turf
Click()
if(usr.ShouldPlace(src))
// If the usr who clicked is supposed to place
// something, place it in this location.
usr.PlaceAtom(src)


Error in
proc
PlaceAtom(atom/loc)
to_place.loc = loc

error: to_place.loc: cannot change constant value
In response to Darkjohn66
Has to be /atom/movable.