How do I spawn items with a spell?
Posted: Mon Oct 08, 2012 6:52 pm
I try to make a spell which spawns an item. But all I get is a very ugly way to exit Grimrock(Program shuts down if the onCast function is executed). What do I do wrong?
The Idea is to be able to select a hero with this item, so effects can take place.
The Idea is to be able to select a hero with this item, so effects can take place.
Code: Select all
defineSpell{
name = "Spawn_it",
uiName = "Shmendrik",
skill = "spellcraft",
level = 1,
runes = "EF",
manaCost = 20,
onCast = function(caster, x, y, direction, skill)
setMouseItem(spawn(healwave_item))
end
}