ID:168182
 
okay my tree system is workin gree but but what i want to happen in stead of rather deleting the tree i would like it it to regrow from a stum to a tree again
i tried
icon_state= '' //doesnt have an icon state dont worry it works
but it won't let me cut the tree down?
The post told you how to do it... look it up

--Vito
huh?
1. write problem
"I want this to happen, but i dont know how to do it. i've tried this and this but i cant figure it out"
2. list of wants
"
1. how do i do this?
2. if i have this, then how could i do this?
"
In response to Vito Stolidus
wut u mean reset variable

o and for the other guy
turf/tree
icon = 'tree.dmi'
icon_state= ""
density = 1
var/state = "Growing"
verb/Deluxe_Cut()
set src in oview(1)
if((locate(/obj/axe) in usr.contents) && src.state == "Growing")
usr << "You try to cut down the freakin tree you freakin tree killer!"
spawn(25)
state = "Dead"
new/obj/wood(usr)
usr.items+= 1
usr << "You get some logs."
icon_state = "Stump"
density = 0
spawn(25)
new/turf/tree(src.loc)
In response to Hobowantdollar
have delete old tree
In response to Rky_nick
wut u mean by have delete old tree
In response to Hobowantdollar
turf/tree
icon = 'tree.dmi'
icon_state= ""
density = 1
var/state = "Growing"
verb/Deluxe_Cut()
set src in oview(1)
if((locate(/obj/axe) in usr.contents) && src.state == "Growing")
usr << "You try to cut down the freakin tree you freakin tree killer!"
spawn(25)
state = "Dead"
new/obj/wood(usr)
usr.items+= 1
usr << "You get some logs."
icon_state = "Stump"
density = 0
spawn(25)
new/turf/tree(src.loc)


fix...

turf/tree
icon = 'tree.dmi'
icon_state= ""
density = 1
var/state = "Growing"
verb/Deluxe_Cut()
set src in oview(1)
if((locate(/obj/axe) in usr.contents) && src.state == "Growing")
usr << "You try to cut down the freakin tree you freakin tree killer!"
spawn(25)
state = "Dead"
new/obj/wood(usr)
usr.items+= 1
usr << "You get some logs."
icon_state = "Stump"
density = 0
spawn(25)
icon_state = "tree"
state = "Growing"
density = 1


The code you posted is flawed... It creates a new tree while one is originally there, but in stump form, and it creates it at the same time it gets cut down, unless I'm reading it wrong.

--Vito
In response to Vito Stolidus
thnx
In response to Hobowantdollar
Hobowantdollar wrote:
wut u mean reset variable

o and for the other guy
turf/tree
icon = 'tree.dmi'
icon_state= ""
density = 1
var/state = "Growing"
verb/Deluxe_Cut()
set src in oview(1)
if((locate(/obj/axe) in usr.contents) && src.state == "Growing")
usr << "You try to cut down the freakin tree you freakin tree killer!"
spawn(25)
state = "Dead"
new/obj/wood(usr)
usr.items+= 1
usr << "You get some logs."
icon_state = "Stump"
density = 0
spawn(25)
new/turf/tree(src.loc)

Use the <_dm> and <_/dm> without the _ to post DM code. It's a lot easier to read.