~Basic Scripting and Editor Help(Easy Scripting Updated!)

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
User avatar
Jgwman
Posts: 144
Joined: Thu Jun 28, 2012 10:14 pm

Re: Basic Scripting and Editor Help(Short Script Reference)

Post by Jgwman » Sat Oct 18, 2014 8:10 pm

Good stuff. That's what I thought it meant, but I was thinking you would not have to define it in a clone. On a side note, it's entirely possible I made this up, but didn't the dev team mention they might be adding a 'plugins' type system for scripts (so for example the toolbar mod could be used in all dungeons automatically)?

User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: Basic Scripting and Editor Help(Short Script Reference)

Post by JohnWordsworth » Sat Oct 18, 2014 8:16 pm

No idea on that one I'm afraid. It would be really cool if it's true, but I don't recall hearing it officially anywhere (doesn't mean it didn't happen though!).
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.

User avatar
Isaac
Posts: 3005
Joined: Fri Mar 02, 2012 10:02 pm

Re: Basic Scripting and Editor Help(Short Script Reference)

Post by Isaac » Sat Oct 18, 2014 8:29 pm

Jgwman wrote: What is the gfxIndex referring to?
Should be the number of the Icon used in the game. The Icons exist in an Icon Atlas texture; a large image with all the icons for inventory items in it.

User avatar
Jgwman
Posts: 144
Joined: Thu Jun 28, 2012 10:14 pm

Re: Basic Scripting and Editor Help(Short Script Reference)

Post by Jgwman » Sat Oct 18, 2014 8:31 pm

Hmmm...my party is "eating" the book (sound effect wise).

Edit: Fixed it by defining the sound, but I'm not entirely sure why it had that sound in the first place.

Something to contribute to the OP's post, the UsableItem component and a couple properties:

Code: Select all

{
		 class = "UsableItem",
		 sound = "level_up",
		 onUseItem = function(self,champion)
		 --do something when item is used
       end
}

User avatar
Rubilax
Posts: 51
Joined: Mon Oct 13, 2014 4:56 am

Re: Basic Scripting and Editor Help(Short Script Reference)

Post by Rubilax » Sat Oct 18, 2014 9:24 pm

SnowyOwl47 wrote:@Rubilax It's getting late for me but here it is:

Code: Select all

spawnspawn("scroll",x,y,height,value i don't know D:,"startMessage")
startMessage.control:setScrollText("text")
party.party:getChampion(1):insertItem(11,startMessage)
This might work but I don't have the editor open bc I'm to tried ill check back in tomorrow and see if it was wrong and if it is ill fix it :geek:
So what exactly am I supposed to be putting in for the first line? I'm not sure if changing x y z or whatever the values may be is what I need. The trigger is a floor_trigger, not coodinates.

User avatar
SnowyOwl47
Posts: 148
Joined: Fri Sep 12, 2014 10:41 pm

Re: Basic Scripting and Editor Help(Short Script Reference)

Post by SnowyOwl47 » Sat Oct 18, 2014 9:46 pm

Rubilax wrote:
SnowyOwl47 wrote:@Rubilax It's getting late for me but here it is:

Code: Select all

spawnspawn("scroll",x,y,height,value i don't know D:,"startMessage")
startMessage.control:setScrollText("text")
party.party:getChampion(1):insertItem(11,startMessage)
This might work but I don't have the editor open bc I'm to tried ill check back in tomorrow and see if it was wrong and if it is ill fix it :geek:
So what exactly am I supposed to be putting in for the first line? I'm not sure if changing x y z or whatever the values may be is what I need. The trigger is a floor_trigger, not coodinates.
Hmmm

Code: Select all

startMessage = spawn("scroll")
startMessage.control:setScrollText("text")
party.party:getChampion(1):insertItem(11,startMessage)
This might work then but I haven't tried spawning anything by just saying spawn("Entity_Name")

User avatar
Rubilax
Posts: 51
Joined: Mon Oct 13, 2014 4:56 am

Re: Basic Scripting and Editor Help(Short Script Reference)

Post by Rubilax » Sat Oct 18, 2014 9:51 pm

Okay I'll play around with that soon, currently trying to wrap my head around creating the ocean shore.

User avatar
SnowyOwl47
Posts: 148
Joined: Fri Sep 12, 2014 10:41 pm

Re: Basic Scripting and Editor Help(Short Script Reference)

Post by SnowyOwl47 » Sat Oct 18, 2014 10:01 pm

Rubilax wrote:Okay I'll play around with that soon, currently trying to wrap my head around creating the ocean shore.
Go to the first page and click the dungeon example download link there is an ocean in it :D but not a very good one soon i'll update it to a more update and better example.

User avatar
Rubilax
Posts: 51
Joined: Mon Oct 13, 2014 4:56 am

Re: Basic Scripting and Editor Help(Basic Script Reference)

Post by Rubilax » Sat Oct 18, 2014 10:19 pm

Yeah I referred to your section about it and it was a bit of help, but most of my issue was that I wasn't placing the ocean entity far enough across the map to get the shore. You should mention that in that area, because the ocean does not work like water; ocean carries on forever and stops dead in it's tracks where the entity is, and water fills up the entire floor where it is placed.

User avatar
Leki
Posts: 550
Joined: Wed Sep 12, 2012 3:49 pm

Re: Basic Scripting and Editor Help(Short Script Reference)

Post by Leki » Sun Oct 19, 2014 1:44 am

SnowyOwl47 wrote:
Rubilax wrote:Okay I'll play around with that soon, currently trying to wrap my head around creating the ocean shore.
Go to the first page and click the dungeon example download link there is an ocean in it :D but not a very good one soon i'll update it to a more update and better example.

I have no idea whats going on in this thread :roll:
I'm the Gate I'm the Key.
Dawn of Lore

Post Reply