Multiple damage types, one weapon
Multiple damage types, one weapon
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.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
- Message me to join in!
Re: Multiple damage types, one weapon
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?
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?
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
- Message me to join in!
- Edsploration
- Posts: 104
- Joined: Wed Sep 19, 2012 4:32 pm
Re: Multiple damage types, one weapon
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,
}Open Project -> Community FrankenDungeon: viewtopic.php?f=14&t=4276
Re: Multiple damage types, one weapon
I'm a little confused as to where I would place this script.
As it's a cloneObject, would it go in one of the mod_asset files?
objects.lua maybe?
As it's a cloneObject, would it go in one of the mod_asset files?
objects.lua maybe?
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
- Message me to join in!
- Edsploration
- Posts: 104
- Joined: Wed Sep 19, 2012 4:32 pm
Re: Multiple damage types, one weapon
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 
Open Project -> Community FrankenDungeon: viewtopic.php?f=14&t=4276
Re: Multiple damage types, one weapon
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?
Grimrock Community 'FrankenDungeon 2012. Submit your entry now!: http://tinyurl.com/cnupr7h
SUBMIT YOUR ASSETS! Community Asset Pack (C.A.P.): http://tinyurl.com/bqvykrp
Behold! The HeroQuest Revival!: http://tinyurl.com/cu52ksc
SUBMIT YOUR ASSETS! Community Asset Pack (C.A.P.): http://tinyurl.com/bqvykrp
Behold! The HeroQuest Revival!: http://tinyurl.com/cu52ksc
Re: Multiple damage types, one weapon
You could also create a custom alcove like this if you don't want people placing any items in it.
Code: Select all
cloneObject{
name = "dungeon_alcove_decorative",
baseObject = "dungeon_alcove",
targetPos = vec(0,0,0),
targetSize = vec(0,0,0)
}- Montis
- Posts: 340
- Joined: Sun Apr 15, 2012 1:25 am
- Location: Grimrock II 2nd playthrough (hard/oldschool)
Re: Multiple damage types, one weapon
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?
I personally do put the cloned party script in the init.lua.
If you only want a very specific pre-placed item not be able to be picked up (e.g. a skull that you gave the ID "glued_skull") use this:
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,
}Re: Multiple damage types, one weapon
I want to fill a room with daemon heads holding skulls in their mouths. >D
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
- Message me to join in!
- Montis
- Posts: 340
- Joined: Sun Apr 15, 2012 1:25 am
- Location: Grimrock II 2nd playthrough (hard/oldschool)
Re: Multiple damage types, one weapon
Then you would probably want to replace the one line to
And obviously create a cloned skull with that name.
Code: Select all
if item.name == "demon_head_skull" then