Multiple damage types, one weapon
Posted: Tue Sep 25, 2012 12:17 am
On the topic of multiple damage types, one weapon, I would like to know: Is it possible?
ex. Physical and poison.
ex. Physical and poison.
Official Legend of Grimrock Forums
http://mail.grimrock.net/forum/
You can do exactly this with the party's onPickUpItem hook. This following code works on preventing the party from picking up and interacting with only the first item placed in dungeon_alcove_1. Be sure to change the id to whichever alcove you're using for this. If you want to prevent the player from interacting with ANY of the items in the alcove you'll need to create a loop to check each one by repeatedly calling the temp() function.Neikun wrote:While on the subjects of what if's and is it possibles,
Is it possible to place an item in an alcove that the player cannot interact with?
ie a skull, but not one that the player can pick up?
Code: Select all
cloneObject{
name = "party",
baseObject = "party",
onPickUpItem = function(self, item) -- Called when any item is picked up
local temp = dungeon_alcove_1:containedItems() -- Get the item list in dungeon_alcove_1
if item == temp() then -- Is the item being picked up the first item in the alcove?
return false -- If so, cancel the pickup action
end
end,
}Edsploration wrote:I think pasting it into any of those files works fine. Personally, I like to keep my custom party definition in the monsters.lua file
Code: Select all
cloneObject{
name = "dungeon_alcove_decorative",
baseObject = "dungeon_alcove",
targetPos = vec(0,0,0),
targetSize = vec(0,0,0)
}No it doesn't, as long as it's not inside other brackets.HaunterV wrote:Edsploration wrote:I think pasting it into any of those files works fine. Personally, I like to keep my custom party definition in the monsters.lua file
but where? the bottom of the document? does it matter?
Code: Select all
cloneObject{
name = "party",
baseObject = "party",
onPickUpItem = function(self, item) -- called when any item is picked up
if item.id == "glued_skull" then
return false -- cancel the pickup action
end
end,
}Code: Select all
if item.name == "demon_head_skull" then