ID:268408
 
I know the command to add a new turf is "new" /blahblah/....
but how do I make it where it deletes that new turf I just added in?
can anyone help me out here?
In response to Dante_Zero
mob
verb
CreateTurf()
var/turf/myturf/T = new //creates a variable T for the turf myturf(obviously change myturf to whatever your turf is
T.loc = locate(x,y,z)//IF u want the turf created at a particular location then change x y z to co-ordinates u need it at
sleep(100)//after 10 secs
del T //delete myturf(the variable T)


That code creates a turf at a particular location and then 10 secs later, it deletes it. Ofcourse you dont wan't that excatly so change it to match ur needs.
In response to DeathAwaitsU
DeathAwaitsU wrote:
That code creates a turf at a particular location and then 10 secs later, it deletes it. Ofcourse you dont wan't that excatly so change it to match ur needs.

You do realize that there can only be one turf per x,y,z location, right? Any other turfs you place ontop of another is actually added to the underlying turf(s) overlays or underlays.
In response to DeathAwaitsU
ok cool thx and I can add multiple turfs in right?
Ugggggg I thin you misunderstood me... I'm trying to have attack that leaves a crater in the shape of a beam which I have done but now I need it where the crater goes away...
In response to Teh Governator
Yes i do but that was just an example to show how to use our new turf to put it somewhere. All he really needed was

verb
CreateTurf()
var /turf/myturf/T = new
del T


Just thought i'd help a bit more
In response to Dante_Zero
You'd need to create new variables like

verb
CreateTurf()
var/turf/myturf/T = new
var/turf/myturf/M = new
var/turf/myturf/N = new


atleast thats how i do it, i'm almost certain there are better ways more experienced coders will let you know.
In response to DeathAwaitsU
obj
ckame
tech=1
name="Chou Kamehameha"
verb
choukame(mob/M in oview(6))
set category = "Fighting"
set name = "Juve Kamehameha"
usr.overlays += 'elec.dmi'
sleep(5)
usr.stamina -= 7
usr.stamina()
usr.overlays -= 'elec.dmi'
var/dam = input("How much do you want to put into this?(Note: You have [num2text(usr.powerlevel,100)] PL left)") as num
if(M.powerlevel == 9999999999999999999999)
view(6)<<"[M]'s can't be harmed by this blast!..."
else
if(dam >= usr.powerlevel)
usr<<"<b>Thats too strong."
if(dam < usr.powerlevel)
M.powerlevel -= (dam + usr.powerlevel * 1.9)
usr.icon_state = ""
if(usr.dir == 1)
usr<<"TEST"
if(usr.powerlevel <= usr.maxpowerlevel)
usr<<"<b>You need to be at least at your max powerlevel to use this!"
if(usr.powerlevel >= usr.maxpowerlevel)
if(usr.stamina <= 5)
usr<<"<b>You have become too tired to use this!"
usr.stamina = 6
else
new /turf/blastbottom(locate(usr.x,usr.y+1,usr.z))
new /turf/blastmiddle(locate(usr.x,usr.y+2,usr.z))
new /turf/blastmiddle(locate(usr.x,usr.y+3,usr.z))
new /turf/blastmiddle(locate(usr.x,usr.y+4,usr.z))
new /turf/blastmiddle(locate(usr.x,usr.y+5,usr.z))
new /turf/blastmiddle(locate(usr.x,usr.y+6,usr.z))
new /turf/blastmiddle(locate(usr.x,usr.y+7,usr.z))
new /turf/blastmiddle(locate(usr.x,usr.y+8,usr.z))
sleep(10)
new /turf/destroyedleft(locate(usr.x-1,usr.y+1,usr.z))
new /turf/destroyed(locate(usr.x,usr.y+1,usr.z))
new /turf/destroyedright(locate(usr.x+1,usr.y+1,usr.z))
new /turf/destroyedleft(locate(usr.x-1,usr.y+2,usr.z))
new /turf/destroyed(locate(usr.x,usr.y+2,usr.z))
new /turf/destroyedright(locate(usr.x+1,usr.y+2,usr.z))
new /turf/destroyedleft(locate(usr.x-1,usr.y+3,usr.z))
new /turf/destroyed(locate(usr.x,usr.y+3,usr.z))
new /turf/destroyedright(locate(usr.x+1,usr.y+3,usr.z))
new /turf/destroyedleft(locate(usr.x-1,usr.y+4,usr.z))
new /turf/destroyed(locate(usr.x,usr.y+4,usr.z))
new /turf/destroyedright(locate(usr.x+1,usr.y+4,usr.z))
new /turf/destroyedleft(locate(usr.x-1,usr.y+5,usr.z))
new /turf/destroyed(locate(usr.x,usr.y+5,usr.z))
new /turf/destroyedright(locate(usr.x+1,usr.y+5,usr.z))
new /turf/destroyedleft(locate(usr.x-1,usr.y+6,usr.z))
new /turf/destroyed(locate(usr.x,usr.y+6,usr.z))
new /turf/destroyedright(locate(usr.x+1,usr.y+6,usr.z))
new /turf/destroyedleft(locate(usr.x-1,usr.y+7,usr.z))
new /turf/destroyed(locate(usr.x,usr.y+7,usr.z))
new /turf/destroyedright(locate(usr.x+1,usr.y+7,usr.z))
new /turf/destroyedleft(locate(usr.x-1,usr.y+8,usr.z))
new /turf/destroyed(locate(usr.x,usr.y+8,usr.z))
new /turf/destroyedright(locate(usr.x+1,usr.y+8,usr.z))
new /turf/destroyedleft(locate(usr.x-1,usr.y+1,usr.z))
new /turf/destroyed(locate(usr.x,usr.y+1,usr.z))
new /turf/destroyedright(locate(usr.x+1,usr.y+1,usr.z))
new /turf/destroyedleft(locate(usr.x-1,usr.y+2,usr.z))
new /turf/destroyed(locate(usr.x,usr.y+2,usr.z))
new /turf/destroyedright(locate(usr.x+1,usr.y+2,usr.z))
new /turf/destroyedleft(locate(usr.x-1,usr.y+3,usr.z))
new /turf/destroyed(locate(usr.x,usr.y+3,usr.z))
new /turf/destroyedright(locate(usr.x+1,usr.y+3,usr.z))
new /turf/destroyedleft(locate(usr.x-1,usr.y+4,usr.z))
new /turf/destroyed(locate(usr.x,usr.y+4,usr.z))
new /turf/destroyedright(locate(usr.x+1,usr.y+4,usr.z))
new /turf/destroyedleft(locate(usr.x-1,usr.y+5,usr.z))
new /turf/destroyed(locate(usr.x,usr.y+5,usr.z))
new /turf/destroyedright(locate(usr.x+1,usr.y+5,usr.z))
new /turf/destroyedleft(locate(usr.x-1,usr.y+6,usr.z))
new /turf/destroyed(locate(usr.x,usr.y+6,usr.z))
new /turf/destroyedright(locate(usr.x+1,usr.y+6,usr.z))
new /turf/destroyedleft(locate(usr.x-1,usr.y+7,usr.z))
new /turf/destroyed(locate(usr.x,usr.y+7,usr.z))
new /turf/destroyedright(locate(usr.x+1,usr.y+7,usr.z))
new /turf/destroyedleft(locate(usr.x-1,usr.y+8,usr.z))
new /turf/destroyed(locate(usr.x,usr.y+8,usr.z))
new /turf/destroyedright(locate(usr.x+1,usr.y+8,usr.z))
M.Die()
sleep(20)




Theres what I have and it works fine but I can't seem to get the destroyed turfs to go away....
In response to Dante_Zero
read my examples and comments.