ID:138961
 
Code:
obj/Flags
icon='Flags.dmi'
density=0
layer=2
BlueFlag
icon_state="Blue"
verb
Pick_Up(var/mob/M)
if(!M.Flag) // checks if u can grab flag
M.Flag=1
world<<"[M] Has Grabed The Blue Flag"

RedFlag
icon_state="Red"
verb
Pick_Up(var/mob/M)
if(!M.Flag)
M.Flag=1
world<<"[M] Has Grabed The Red Flag"
turf/FlagFloor
icon='Flags.dmi'
density=0
BlueFloor
icon_state="BFloor"
Enter(var/mob/M)
if(M.Flag)
BlueP+=1
M.Flag=0
world<<"The Blue Team Has Scored A Point."
return
else
return
RedFloor
icon_state="RFloor"
Enter(var/mob/M)
if(M.Flag)
RedP+=1
M.Flag=0
world<<"The Red Team Has Scored A Point."
return
else
return


Problem description: No Matter What i do The Flag Doesn't get pick up by the opposite team member and i don't know why does anyone more experienced know why and can help me understand why ?

var/mob/M as an argument here has no effect in the verb. Use usr.

Also doing else return at the very end of the if() statements is somewhat redundant.

ALSO also using Enter() probably isn't the best idea here, Entered() is probably more suited. Enter() is an event that checks whether or not you can even enter the /turf, Entered is called when you do enter the /turf.