ID:141817
 
Code:
proc
NewVillage(mob/owner)
var/randomX = rand(1,world.maxx)
var/randomY = rand(1,world.maxy)
var/obj/village/NewVillage = new
NewVillage.loc = locate(randomX,randomY,1)
for(var/obj/O in oview(NewVillage,0))
del(O)
usr.loc = locate(NewVillage.x,NewVillage.y,NewVillage.z)

proc/randomizeMap()
for(var/turf/T in world)
var/random = rand(1,100)
if(random<=8)
else if(random<=92)
var/obj/tree/Tr = new(T)
Tr.icon = Tr.icon
else
var/obj/mountains/M = new(T)
M.icon = M.icon


Problem description:

Whenever I call the newvillage proc, it doesnt create a new village it just moves the old one to the new location.
Try using the New() proc?
In response to Mizukouken Ketsu
... 5th line of code:
var/obj/village/NewVillage = new

-------------------------------^ This IS the new.
In response to KingCold999
Fine... don't listen to me. Minus well not accept anyone else's help either.
In response to Mizukouken Ketsu
?
I used New(), thats the problem. When it is suppose to make a New object it just moves the previous one.
And who's minus?
Instead of
        var/obj/village/NewVillage = new
NewVillage.loc = locate(randomX,randomY,1)

See if this makes a difference:
        var/obj/village/NewVillage = new(locate(randomX,randomY,1))
In response to Nickr5
Nope, now it stays at 1,1. However, it does delete a random "Tree" icon, so I believe at least part of it is working :D
In response to KingCold999
Have you overwritten the /obj/village/New() proc?
In response to Nickr5
ive only overwritten atom/movable/New() and that was this:
    New()
for(var/atom/movable/A in range(1, loc))
if(A.autojoining)
A.AutoJoin()
..()
In response to KingCold999
Sorry for double post, but I found the problem and corrected it. I was using autojoin, and put an autojoin=1 in the wrong place under turf :P
In response to Nickr5
The New() proc doesn't have a default action.