ID:157651
 
ok im makeing a game and want to add something that when use a special or something it sends them flying a certain number of tiles ive looked up stuff on resource but theres nothing that helps me (Like make a code for me thatd be great)
You can't make a quality game from ripping off sources. Ive been where you are and I tried it. I learned a tiny bit but I was way better off when I read the guide. This is an ex from chapter 7 you could mod:

mob/Bump(mob/M)
if(istype(M) && M.key && src.key)
var/pos = M.loc
M.loc = usr.loc
usr.loc = pos
else ..()
In response to Darkjohn66
That swaps the people's location... and using usr in non-directly called procedures like Bump() is EXTREMELY bad... you had it working nicely with src...

You were on the right track though:
mob/Bump(mob/M)
if(istype(M)) // lets make it push all /mob's
for(var/i = 1 to 3) // Make the person move 3 steps ahead
step(M, src.dir) // moving M in the direction of src