ID:169234
 
Can somone help me?

How can I make it so when you bump someone else they get shot back 1 sqaure?

mob
Login()
world<<"[src.key] Has joined the bumper test!"
icon = 'Bumpers!.dmi'
Thats my login code if its trully needed...
step_away proc

See also:
get_step_away proc
walk_away proc

Format:
step_away(Ref,Trg,Max=5)

Returns:
1 on success; 0 otherwise.

Args:
Ref: A mob or obj.
Trg: An object on the map.
Max: The maximum distance between Ref and Targ before movement halts.

Move Ref on a path away from location Trg, taking obstacles into account. If Ref is farther than Max steps from Trg, no action will be taken.
In response to Jmurph
Jmurph wrote:
step_away proc

See also:
get_step_away proc
walk_away proc

Format:
step_away(Ref,Trg,Max=5)

Returns:
1 on success; 0 otherwise.

Args:
Ref: A mob or obj.
Trg: An object on the map.
Max: The maximum distance between Ref and Targ before movement halts.

Move Ref on a path away from location Trg, taking obstacles into account. If Ref is farther than Max steps from Trg, no action will be taken.


but trg has to be an object not a mob. Im saying when a player hits another player.
In response to Strawgate
What? step_away takes a mob OR obj as trg. So it should work fine for player mobs.
In response to Jmurph
How would I implement it? I dont understand howto tell it.
In response to Strawgate
mob
Bump(atom/movable/a)
if(!istype(a))return
step_away(a,src)
In response to Ol' Yeller
Is there something I change this too?

    Bump(atom/movable/a)
In response to Strawgate
You should know about args. :/
In response to Ol' Yeller
XD I got it...