ID:269204
 
How do I make it to where when you walk into the same space as an object without density you'll pick it up?
Use Entered.
turf/Entered(atom/movable/A)
for(var/obj/O in contents)
if(O.retrievable)
O.Move(A)
In response to Loduwijk
Loduwijk wrote:
Use Entered.
> turf/Entered(atom/movable/A)
> for(var/obj/O in contents)
> if(O.retrievable)
> O.Move(A)
>



How does this work?
Do I have to assign this to all my turfs?
I'd hate to have to do that because, trust me, I have an ***load of turfs!
In response to Hiro the Dragon King
turf/Entered(atom/movable/A) //Asigns to ALL turfs
for(var/obj/O in contents) //Checks for all objs in the turf's contents
if(O.retrievable) //Makes sure this is something you CAN pick up
O.Move(A) //Moves the obj to the client


I didn't write that snippet but I commented it for you. If still don't understand please ask.

-Ryan
In response to Ryne Rekab
Ryne Rekab wrote:
> turf/Entered(atom/movable/A) //Asigns to ALL turfs
> for(var/obj/O in contents) //Checks for all objs in the turf's contents
> if(O.retrievable) //Makes sure this is something you CAN pick up
> O.Move(A) //Moves the obj to the client
>


Um...It says O.retrievable is an undefined var.
In response to Hiro the Dragon King
You have to set that yourself.
turf
var
retrievable


Then set it to 1 if you can put it up.

-Ryan
In response to Ryne Rekab
Ryne Rekab wrote:
You have to set that yourself.
> turf
> var
> retrievable
>

Then set it to 1 if you can put it up.

-Ryan

*cough*
obj
var
retrievable
In response to Hell Ramen
*cough* I get distracted sometimes. I shouldn't have to tell him how to set a variable anyways *uncough*

Boy, you'd think I had a bad cold. >_> <_<

-Ryan