Ask a simple question, get a simple answer

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
Sutekh
Posts: 126
Joined: Sun Nov 25, 2012 9:58 am
Location: UK

Re: Ask a simple question, get a simple answer

Post by Sutekh »

Give this a try instead, I think it should work:

kb_teleport.controller:deactivate()
Decayer
Posts: 65
Joined: Sat Oct 13, 2012 3:19 pm

Re: Ask a simple question, get a simple answer

Post by Decayer »

TheLastOrder wrote:Hi there everybody. After looking as a crazy man in the reference list and several searchs on the forum, here we go:


then
kb_levers_door.door:open()
kb_teleport.teleport:isDeactivated()

The door opens, but the teleport isn't deactivated. the game crashes and returns me that it calls a nil value, when the kb_teleport actually EXISTS, I can see it and I can feel it xDDDD

I tried local kb_teleport = findEntity("kb_teleport"), but still the same problem.

And I tried :toggle or :deactivate

Nothing...

Thanks!!! :D
It's crashing because it should be kb_teleport.teleporter. Anyway, turning teleporters on/off is easiest done with teleporter_id.controller:activate()/teleporter_id.controller:deactivate(); also, :isDeactivated() only checks if the teleporter is deactivated, it doesn't deactivate it.

Edit: oh no, beaten... but mine is longer!
User avatar
QuintinStone
Posts: 72
Joined: Sat Nov 01, 2014 9:58 pm

Re: Ask a simple question, get a simple answer

Post by QuintinStone »

Decayer wrote:Edit: oh no, beaten... but mine is longer!
Now now, this isn't that kind of site!
User avatar
MasterworkStone
Posts: 76
Joined: Mon Sep 01, 2014 4:15 am

Re: Ask a simple question, get a simple answer

Post by MasterworkStone »

Are new skills addable? or are we forever stuck with no unarmed skill?
User avatar
QuintinStone
Posts: 72
Joined: Sat Nov 01, 2014 9:58 pm

Re: Ask a simple question, get a simple answer

Post by QuintinStone »

The scripting reference shows the syntax of the defineSkill function:
defineSkill(desc)
Defines a new skill or replaces an existing skill definition. desc is a table with the following fields:
http://www.grimrock.net/modding/scripting-reference/

I've not used it myself so I really have no idea what will happen in game.
User avatar
Drakkan
Posts: 1318
Joined: Mon Dec 31, 2012 12:25 am

Re: Ask a simple question, get a simple answer

Post by Drakkan »

my question - where is NutJob and what happened to him ?
Breath from the unpromising waters.
Eye of the Atlantis
User avatar
Doridion
Posts: 256
Joined: Tue Jun 10, 2014 9:23 pm

Re: Ask a simple question, get a simple answer

Post by Doridion »

Drakkan wrote:my question - where is NutJob and what happened to him ?
Where, I think he's gone ...
Why ? I realy don't know.
What happened .... he removed all his scripts and appearely unsubscribed ((

I'm really bored about that, 'cause he's an excellent modder/scripter ((
GoldenShadowGS
Posts: 168
Joined: Thu Oct 30, 2014 1:56 am

Re: Ask a simple question, get a simple answer

Post by GoldenShadowGS »

That's odd, I wonder what happened to make him want to do that.
User avatar
TheLastOrder
Posts: 104
Joined: Wed Oct 17, 2012 1:56 am

Re: Ask a simple question, get a simple answer

Post by TheLastOrder »

Sutekh wrote:Give this a try instead, I think it should work:

kb_teleport.controller:deactivate()
Decayer wrote:It's crashing because it should be kb_teleport.teleporter. Anyway, turning teleporters on/off is easiest done with teleporter_id.controller:activate()/teleporter_id.controller:deactivate(); also, :isDeactivated() only checks if the teleporter is deactivated, it doesn't deactivate it.

Edit: oh no, beaten... but mine is longer!
Both solutions worked. Holy....

You'll be credited for this guys xDDDD
User avatar
Leki
Posts: 550
Joined: Wed Sep 12, 2012 3:49 pm

Re: Ask a simple question, get a simple answer

Post by Leki »

MasterworkStone wrote:Are new skills addable? or are we forever stuck with no unarmed skill?
Here:
viewtopic.php?f=22&t=8136&p=83046&hilit ... ing#p83044
I'm the Gate I'm the Key.
Dawn of Lore
Post Reply