ID:157078
 
I'm sorry. I'm trying to manipulate objects assigned to a particular user but i really don't know what im doing. This is how it SHOULD work in my head


        mob/verb/test2()
usr.p1 = new /obj/fish(usr.loc)
src.loc = locate(src.x+1,src.y+0,src.z+0)//how do i get this so i can assign its position to the left of the usr without placing it then moving it?

make_it_move()
usr.p1.swim()


obj
fish

obj/proc
swim()
step(src,dir)
Create the object before you assign it to pl.
In response to Warlord Fred
No good.

mob
var/p2 = null
obj
fish
proc/swim()
step(src,dir)

mob
verb
test3()
new /obj/fish(usr.loc)
src = usr.p2
src.swim()
// or usr.p2.swim()
new /obj/fish(get_step(usr, EAST))
In response to Garthor
Garthor wrote:
new /obj/fish(get_step(usr, EAST))


What is this for?

The problem is I'm getting a undefined proc on the

usr.p1.swim()

I can't from the mob make a verb that forces an object (that is assigned to the mobs variable) to move. Like remote control.
In response to Lilcloudy1
What I wrote is how you create an atom in a specific location relative to another atom (in this case, usr).

You did not specify the type of p1 as /obj/fish, so it gives you an error when you attempt to call swim(). To give the variable a type, declare it like so:

mob
var/obj/fish/p1