Page 2 of 2

Re: Calling on a spawned item.

Posted: Fri Jun 12, 2015 8:03 am
by Isaac
Did you call the checkObject() function?
*It destroys the dagger when called; if the dagger exists.

__________
If you call your spawnDagger() function twice, it will crash. This is because you are defining the name as a fixed value in the code. It's okay so long as you never call it again, after the first time [unless you destroy the first dagger], but it is certainly possible to let the game safely name the item on its own, and check for the Id that the game assigned to it, instead of "powerdagger".