ID:772546
 
(See the best response by Albro1.)
Code:


Problem description:

Well I don't know how to go about this but, I'm trying to make a object that if you get near it like maybe 5 tiles all around itself you get suck in to it. then it diasppear and your free to move around.


Anyone know how to get a start on this?
I tested in game compile it etc. no errors but it doesn't seem to work
http://img837.imageshack.us/img837/9766/scrnshot1k.jpg
as you can see in the screnshot. the Glowing red obj is the wormhole and the tan yellow hair person is me.
Best response
That would be because Kozuma gave you an example that sent an object to the step() proc. Use step_to(M, src) instead.
Yea that seem to work, But Player can still walk away from it, There no force so i thought maybe if i use, the frozen proc.
usr.frozen=1

obj/WormHole
icon='Flame Portal.dmi'
New(){src.AI()}
proc/AI()
while(src)
sleep(5)
for(var/mob/M in oview(9,src))
step_to(M, src)
usr.frozen=1
if(src.loc==M.loc)del src
usr.frozen=0

It would work. but i got an error xD do you guys know why?
I'm gonna take a guess and say that the error has to do with your frozen VARIABLE (not proc). It should be M.frozen instead of usr.frozen because M is the mob that is being sucked into it.
In response to OrganizationXIIGaming (#3)
You're using usr in a proc. You need to reference the mob. It isn't very helpful to us if you don't tell us the error. I can almost guarantee your error is frozen: undefined variable though.