I want this code to spawn a obj to a location and check to see if someones coords match the objs coords. If so I want the coords to be stored in the person that uses the verbs vars.
Heres what I was thinking...
mob
var
coord1 = 0
coord2 = 0
coord3 = 0
truecoord = 0
obj
newobj/B
mob
verb
newobj()
var/A = new /obj/newobj/B(loc = locate(src.x,src.y+1,src.z))
src.x = usr.coord1
src.y = usr.coord2
src.z = usr.coord3
I need to combine the 3 coord's to make the truecoord but this is where my problem is... Only way I can think to do this atm is this...
usr.truecoord = usr.coord1,usr.coord2,usr.coord3
Doesn't work. Theres an easier way to do this code i'm sure I think its called nesting? Which I dont know how to do.
[edit]
I forgot the part about the IF part but i cant do that till I get this working anyway.
Cloudy, you're being very unclear. When asking for help on the developer forum, you should be informative, accurate, and specific. Also, good grammar is a plus (It makes your post understandable)
Right now, as I understand it, you want to, in a mob/verb, create a random obj at a random location and check if there are any player characters at that location. Then, if there is a player character at that spot, you want to store the location in a variable belonging to the src of the verb. I doubt this is what you want. Please clarify.