ID:1362805
 
(See the best response by Ter13.)
Code:
Bump() Cross() Crossed()


Problem description:
I'm not sure if there is a way already to do this but I'm trying to make a bump happen with out using a dense object. Kind of a reverse Crossed to where instead of walking in the object just have to go over you. I can think of a few ways of doing this but before I started all that I just wanted to know if Byond had a simple way to do this.

Kind of a reverse Crossed to where instead of walking in the object just have to go over you.

Can you clarify this question? Give me an example, I'd be glad to help.
obj/Spike
Crossed(O)
O << "You stepped a spike and your foot is now bleeding sucks to be you!"

The first one is a spike which is on the ground as an obj. If you step over it you will get hurt.

What I am trying to do is make a projectile which is like a laser beam that is not dense but will keep stepping forward and will hit whatever it bumps into and keep going past that. So what i'm looking for is if there is something like bump or crossed that will do this.
Well since it seems a little slow for the moment I will just change the density then just take a step and change it right back and have the path keep going. If anyone knows a cleaner way to do this let me know, it works but kind of a messy way to do it.

density = 0
step(src,src.dir)
density = 1
Best response
There's a couple ways to do this. You can override Cross() on atom/movable to call an OnCross() function defined under /movable.

You can also force the move to happen within Bump(). Your way works, but it will also never hit any turfs.