Page 20 of 400

Re: Ask a simple question, get a simple answer

Posted: Wed Nov 12, 2014 5:14 pm
by Sutekh
Give this a try instead, I think it should work:

kb_teleport.controller:deactivate()

Re: Ask a simple question, get a simple answer

Posted: Wed Nov 12, 2014 6:07 pm
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!

Re: Ask a simple question, get a simple answer

Posted: Wed Nov 12, 2014 6:26 pm
by QuintinStone
Decayer wrote:Edit: oh no, beaten... but mine is longer!
Now now, this isn't that kind of site!

Re: Ask a simple question, get a simple answer

Posted: Wed Nov 12, 2014 7:33 pm
by MasterworkStone
Are new skills addable? or are we forever stuck with no unarmed skill?

Re: Ask a simple question, get a simple answer

Posted: Wed Nov 12, 2014 7:38 pm
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.

Re: Ask a simple question, get a simple answer

Posted: Thu Nov 13, 2014 12:24 am
by Drakkan
my question - where is NutJob and what happened to him ?

Re: Ask a simple question, get a simple answer

Posted: Thu Nov 13, 2014 1:00 am
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 ((

Re: Ask a simple question, get a simple answer

Posted: Thu Nov 13, 2014 2:14 am
by GoldenShadowGS
That's odd, I wonder what happened to make him want to do that.

Re: Ask a simple question, get a simple answer

Posted: Thu Nov 13, 2014 9:19 am
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

Re: Ask a simple question, get a simple answer

Posted: Thu Nov 13, 2014 10:33 am
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