Custom Potion & Destroying a spawned item
Posted: Sat Feb 21, 2015 8:47 pm
So I'm attempting to destroy something I just spawned in, (its for visual effects) and I keep trying to guess what the items name is.
Above is the code I currently have in the one script, the tomb_wall object is what I've spawned in but I don't know for a fact that that name is what it goes by. Is there any way to figure out what the name of a spawned in item is? At the moment I have a pressure plate that when stepped on destroys whats already in place and then spawns in the tomb_wall_sarcophagus_mummy. I already have 4 others of it in the dungeon so I assumed that putting _5 after it would be what its called but my script isn't deleteing it.
Second thing I'm attempting to work on is making a potion that the party could make that basically only heals either wounds, I plan on just using the normal red potion model for it and picture for in game just with a different text on it.
As far as coding a new potion in and the recipe for it how would I go about doing that. I know theres a spell someone made to make it so you can cast and heal your parties wounds that way, but I'm attempting to find a way to just have an item that you can have do that and I think the potions would be the fun way to have that be in there.
SpoilerShow
function destroyObject()
if findEntity("tomb_wall_sarcophagus_mummy_5") ~= nil then
tomb_wall_sarcophagus_mummy_5:destroy()
end
end
if findEntity("tomb_wall_sarcophagus_mummy_5") ~= nil then
tomb_wall_sarcophagus_mummy_5:destroy()
end
end
Second thing I'm attempting to work on is making a potion that the party could make that basically only heals either wounds, I plan on just using the normal red potion model for it and picture for in game just with a different text on it.
As far as coding a new potion in and the recipe for it how would I go about doing that. I know theres a spell someone made to make it so you can cast and heal your parties wounds that way, but I'm attempting to find a way to just have an item that you can have do that and I think the potions would be the fun way to have that be in there.