ID:261635
 
Well, here's what I HAD in mind, but it didn't seem to..work. I'm not surprised, either. (I am to lazy to figure out the demo, do not bitchslap me.)
obj planting MSeed name="Seeds" icon='turfs.dmi' icon_state="planted" src:EvolveB() proc/EvolveB() sleep(20) del(src) new /obj/planting/MBaby

well, if someone could "guide" me along the lines of that code, i'd be thankful.
Maybe next time you can choose some different wording for your type of "slap." Your error, however, is coming up because your deleting src too early. BYOND is your friend, and whenever you delete one of the main references to a proc, it will stop that proc. Otherwise you could get loads of errors from that same proc trying to get in touch with src, which no longer exists.

So essentially just move del(src) down one line.


~Polatrite~
In response to Polatrite
doesnt work.
In response to Tamaka-san
You also have to specify where the new object is being created. Put that inside ()'s. Like this:

new /path(loc)

var/path = new(loc)
In response to Tamaka-san
Ahh. Forgot to write the other half. You need to execute the proc inside the New() proc.

New()
..()
procname() // forgot what it was already, since clicking reply.
In response to Garthor
Yeah, what he said. I'm losing the touch.
In response to Garthor
OK...
I'm confused.

All I need is a simple code snippet...

This is what i'm working with.

mob/proc/Evolve(M as mob in oview(0))
sleep(time)
new /obj/NewPlant(loc=locate(M))
del(M)

obj
OldPlant
icon='icon.dmi'
src:Evolve()

NewPlant
icon='icon.dmi'

Now that is not working, and I don't see why not.
In response to Tamaka-san
Tamaka-san wrote:
mob/proc/Evolve(M as mob in oview(0))
sleep(time)
new /obj/NewPlant(loc=locate(M))
del(M)

Ok, oview(0), Im pretty sure that oview(0) should be either a number larger then 0, or just oview() (Defualts to screen size)
The loc=locate(M) part should just be locate(M)

I think thats what was doing it.
-DogMan
In response to Tamaka-san
obj
OldPlant
icon='icon.dmi'
src:Evolve()

Assuming you've indented your code properly (I'm assuming the forums messed up your identation), you need to change <code>src:Evolve()</code> to <code>New() src.Evolve()</code>
In response to Crispy
Crispy wrote:
obj
OldPlant
icon='icon.dmi'
src:Evolve()

Assuming you've indented your code properly (I'm assuming the forums messed up your identation), you need to change <code>src:Evolve()</code> to <code>New() src.Evolve()</code>

If the forums had messed up his indentation, there'd still be some. He didn't put any in his post, which is quite unusual.

Lummox JR