Ask a simple question, get a simple answer
Re: Ask a simple question, get a simple answer
Can someone help with creating custom items? I've started working on a dungeon with new models and item icons etc. but I have no idea how to set things up in Grimrock II.
It seems cloneObject isn't working the way it did in Grimrock I, and if I try to manually set stats etc. I just mess the dungeon up so it wont load anylonger.
Thanks in advance!
It seems cloneObject isn't working the way it did in Grimrock I, and if I try to manually set stats etc. I just mess the dungeon up so it wont load anylonger.
Thanks in advance!
Re: Ask a simple question, get a simple answer
Expanding on Trollman's question:
Could someone show (or throw me a link) how to clone objects and give them different properties? I don't want new icons or models, I just want to, for example, make a different longsword with a new name and higher damage, while keeping the regular old longsword in the game. That's possible, right?
Could someone show (or throw me a link) how to clone objects and give them different properties? I don't want new icons or models, I just want to, for example, make a different longsword with a new name and higher damage, while keeping the regular old longsword in the game. That's possible, right?
Re: Ask a simple question, get a simple answer
If you only want to change some fundamentals of an object just spawn it in and change what you want.Matlock19 wrote:Expanding on Trollman's question:
Could someone show (or throw me a link) how to clone objects and give them different properties? I don't want new icons or models, I just want to, for example, make a different longsword with a new name and higher damage, while keeping the regular old longsword in the game. That's possible, right?
Example
Code: Select all
local skull_of_dargoth = spawn("skull")
skull_of_dargoth.item:setDescription("Only in purest darkness\nshall the way be shown.")
skull_of_dargoth.item:setWeight(0.8)
skull_of_dargoth.item:setUiName("Brittle Human Skull")
Re: Ask a simple question, get a simple answer
What's the easiest way to listen to the sounds? ATM the best method I have is to drop a sound entity and "guess" at sounds then load the game, and, even then, it won't play most of the time (guessing only loops will play with the sound entity?), which is the most implausible way to do it.
Re: Ask a simple question, get a simple answer
So that script spawns the item at the location of the script entity when the level is loaded. Nice. Thank you!NutJob wrote:Code: Select all
local skull_of_dargoth = spawn("skull") skull_of_dargoth.item:setDescription("Only in purest darkness\nshall the way be shown.") skull_of_dargoth.item:setWeight(0.8) skull_of_dargoth.item:setUiName("Brittle Human Skull")
And can I alter the properties of a spawned weapon by adding:
Code: Select all
sword_of_whatever.item:setattackPower = 10
sword_of_whatever.item:setaccuracy = 10
sword_of_whatever.item:setbaseDamageStat = dexterity
Re: Ask a simple question, get a simple answer
What does the "currentLevelOnly" do in timers? It seems that timers pause even without it when you're in a different level. And is there a way to make them tick even when you're not in the same level as the timer?
Re: Ask a simple question, get a simple answer
Yes, and you can wrap it up in a function and have it triggered by something, or on load of the game. Being you want to clone an object this may be the fastest way, really, without messing with defineObject.Matlock19 wrote: And can I alter the properties of a spawned weapon by adding:
Code: Select all
sword_of_whatever.item:setattackPower = 10 sword_of_whatever.item:setaccuracy = 10 sword_of_whatever.item:setbaseDamageStat = dexterity
You can give it to a player with insertItem or to a surface with addItem or to coordinates while spawn()'ing the item.
Re: Ask a simple question, get a simple answer
Well it seems that trying to change the attack power, accuracy, etc. gives me an error: " function arguments expected near '=' ".
Code: Select all
local new_rapier = spawn("rapier")
new_rapier.item:setDescription("A ceremonial sword.")
new_rapier.item:setattackPower = 10
new_rapier.item:setUiName("New Rapier")
Re: Ask a simple question, get a simple answer
try youritemname.meleeattack:setAttackPower(10) <-- might be wrong, not at the correct computer.
Re: Ask a simple question, get a simple answer
Worked perfectly, thank you again. Don't know what I would do without this forum!NutJob wrote:try youritemname.meleeattack:setAttackPower(10) <-- might be wrong, not at the correct computer.
FURTHER EDITS!
Forget my dumb question, figured it out. I needed to call the cloak "new_cloak.equipmentitem" when setting those properties, not just ".item". Duh.
Last edited by Matlock19 on Thu Nov 06, 2014 4:52 am, edited 2 times in total.