ID:140177   Apr 10 2010, 9:05 am (Edited on Apr 10 2010, 12:17 pm) The objs and entering them: ```obj Red_Flag icon = 'redflag.dmi' Blue_Flag icon = 'blueflag.dmi'turf Red_Ring icon = 'Rring.dmi' Entered(mob/M) if(/obj/Blue_Flag in M.contents) if(Red_Halt == 0) Red_Halt = 1 redteamscore++ var/obj/Blue_Flag/Bf del Bf Bf = new(null, src) if(prob(50)) Bf.loc = locate(101,101,2) else Bf.loc = locate(100,1,2) view() << "Red team has scored a point! They have [redteamscore]/13 points to go!" if(redteamscore>12) view() << "The game is over. Red team is victorious!" view() << output("Red WINS! Rebooting . . .","log") world.Reboot() else M << "You must wait 12 seconds, do not continue to try before the time is up!" sleep(120) M << "Time Up!" Red_Halt = 0 if(M.team == 2) M << output("Get it!","log") Blue_Ring icon = 'Bring.dmi' Entered(mob/M) if(/obj/Red_Flag in M.contents) if(Blue_Halt == 0) Blue_Halt = 1 blueteamscore++ var/obj/Red_Flag/Br del Br Br = new(null, src) if(prob(50)) Br.loc = locate(1,101,2) else Br.loc = locate(1,1,2) view() << "Blue team has scored a point! They have [blueteamscore]/13 points to go!" if(redteamscore>12) view() << "The game is over. Blue team is victorious!" view() << output("Blue WINS! Rebooting . . .","log") world.Reboot() ..() else M << "You must wait 12 seconds, do not continue to try before the time is up!" sleep(120) M << "Time Up!" Blue_Halt = 0 if(M.team == 2) M << output("Get it!","log") ``` Get: ```obj verb get() set hidden = 1 set src in oview(2) usr << output("You get [src]","log") if(src!=/mob||/turf) if(src == /obj/Red_Flag) if(usr.team == 2) view() << "[usr.key] has obtained the Red Flag!" // Move(usr) usr.contents+=src else src << output("That's yours!","log") return else if(src == /obj/Blue_Flag) if(usr.team == 1) view() << "[usr.key] has obtained the Blue Flag!" // Move(usr) usr.contents+=src else usr << output("That's yours!","log") return ``` Problem description: -There are 2 objs. When I enter a turf I want it to check if the obj is in the contents and do an action. --My get code just takes the item no matter what. It doesn't check for what I want it to. Edit: Thank-you Garthor. You've helped me a lot. When I get a credit card I'm definatly gifting you a membership.
 Apr 10 2010, 9:59 am Type paths are not objects. Searching contents for /obj/whatever will never find anything, because it's a type path, not an object. If you want to find an actual instance of an object, use locate(). Also: all the view()s should be view(src), otherwise they default to view(usr) and usr should not be used in procs.