Assets and introduction to scripting and scripting ref ETA ?
- cromcrom
- Posts: 549
- Joined: Tue Sep 11, 2012 7:16 am
- Location: Chateauroux in a socialist s#!$*&% formerly known as "France"
Assets and introduction to scripting and scripting ref ETA ?
Hello there. Any ETA of the assets download and Introduction to Scripting (with list of Scripting references ) ? Just, erm, you know, I am on holydays next week, and I will have plenty of time to code (that is, if I don't go hiking. Anyways...).
A trip of a thousand leagues starts with a step.
- Mysterious
- Posts: 226
- Joined: Wed Nov 06, 2013 8:31 am
Re: Assets and introduction to scripting and scripting ref E
Sorry Crom Crom no luck on that yet but I hope it happens soon, god I need them bad lol.
- Chimera005ao
- Posts: 187
- Joined: Sun Jun 29, 2014 8:34 am
Re: Assets and introduction to scripting and scripting ref E
Quite a few of us are waiting. There is much fun to be had.
And ends with Johny dying of dysentery somewhere around Chimney Rock.A trip of a thousand leagues starts with a step.
Re: Assets and introduction to scripting and scripting ref E
I agree with this thread. Actually I'm willing to pay to have the documentation at this point. Thank you ADHD for making me want to spend all my money.
Re: Assets and introduction to scripting and scripting ref E
I cannot say anything else than "ME TOO" ! The cool thing is that during the waiting I can put on a (numeric) sheet of paper all my futur mod stories and quests.NutJob wrote:I agree with this thread. Actually I'm willing to pay to have the documentation at this point. Thank you ADHD for making me want to spend all my money.
Re: Assets and introduction to scripting and scripting ref E
Anyone with a little background on creating custom assets in LoG1 help me with this?
Objective: close a door slower so it doesn't slam shut
So far added this to my objects.lua
Reloaded my Project. Woot! It's there.
Added this to a script
Walked over floor trigger. Works... almost. Door still shuts at the same acceleration and velocity as normal so I think I made my definition completely wrong.
I know one of the dev's gave us a "sample" of the structure (in General Discussion) but I can not, for the life of me, find it again.
Objective: close a door slower so it doesn't slam shut
So far added this to my objects.lua
Code: Select all
defineObject {
name = "door_of_closing",
baseObject = "dungeon_door_portcullis",
components = {
class = "door",
closeVelocity = -0.5,
closeAcceleration = -50,
}
}
Added this to a script
Code: Select all
spawn("door_of_closing", 1, 26, 29, 1, 5, "doc1")
doc1.door:setDoorState("open")
floor_trigger_1.floortrigger:addConnector("onActivate", "doc1", "close")
I know one of the dev's gave us a "sample" of the structure (in General Discussion) but I can not, for the life of me, find it again.
- JohnWordsworth
- Posts: 1397
- Joined: Fri Sep 14, 2012 4:19 pm
- Location: Devon, United Kingdom
- Contact:
Re: Assets and introduction to scripting and scripting ref E
I'm afraid I do not have a solution with regards to which keywords to use exactly, but I have spotted on syntax error in your definition which means that the door component is likely not being defined correctly. The "components" property should refer to a list of components (each of which is it's own table), so there should be some extra curly braces in there.
Notice the extra set of braces around the component definition. I also expect that "Door" should be capitalised (also changed above). Beyond that, there's no definite way of knowing what you need to put for the open/close velocity - but it's possible the above may work!
Code: Select all
defineObject {
name = "door_of_closing",
baseObject = "dungeon_door_portcullis",
components = {
{
class = "Door",
closeVelocity = -0.5,
closeAcceleration = -50,
}
}
}
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
Re: Assets and introduction to scripting and scripting ref E
Your example got me back on track and I'm now getting the results I want by removing closeVelocity/Acceleration.
Works exactly how I want; door closes slowly. Now the question is how to speed it up for future Projects. I'm guessing we're waiting to know this kind of information from the LoG2 asset_pack.zip? (unsure what we're waiting for to gain access ~laughs~)
Code: Select all
defineObject {
name = "door_of_closing",
baseObject = "dungeon_door_portcullis",
components = {
{
class = "Door"
}
}
}
Re: Assets and introduction to scripting and scripting ref E
I have no idea what the range for these method calls are but I got this working.
Velocity: -0.1 (slowest) to -100 (fastest). No idea what the actual range is but going lower (faster) than -100 I seen no difference.
--
Edit: the best my perception allows, this...
... seems to be about default closing speed.
Code: Select all
spawn("door_of_closing", 1, 26, 29, 0, 5, "doc1")
doc1.door:setDoorState("open")
doc1.door:setCloseVelocity(-2.4)
doc1.door:setCloseAcceleration(-0.7)
floor_trigger_1.floortrigger:addConnector("onActivate", "doc1", "close")
--
Edit: the best my perception allows, this...
Code: Select all
doc1.door:setCloseVelocity(-2.9)
doc1.door:setCloseAcceleration(-2.1)
- cromcrom
- Posts: 549
- Joined: Tue Sep 11, 2012 7:16 am
- Location: Chateauroux in a socialist s#!$*&% formerly known as "France"
Re: Assets and introduction to scripting and scripting ref E
May I suggest you guys open a dedicated thread about this door issue, as it might interest other modders, that might not think about looking into this tread
A trip of a thousand leagues starts with a step.