Page 210 of 400

Re: Ask a simple question, get a simple answer

Posted: Tue Aug 29, 2017 8:03 pm
by akroma222
Hmm, ok.
It is very hard to trouble shoot if I can't see how you are calling the Samples from grimtk
Can you post some examples of your code used to call them?
Have you tried adding the grimtk files to a fresh new dungeon without any other modded files?

Re: Ask a simple question, get a simple answer

Posted: Tue Aug 29, 2017 11:40 pm
by Xardas
So i made new dungeon and i worked perfect there, but what you said gave me an idea. I now imported grimtk last to my init.lua and now it works fine for what i tested now. Seems like the other assets overwrote something in the grimtk asset. I hope i don´t have other Bugs now. :lol:
Many thanks for your help akroma.

Re: Ask a simple question, get a simple answer

Posted: Sun Sep 03, 2017 2:56 am
by Xardas
How can i disable the clickable component of a base alcove in the objects Definition?

Re: Ask a simple question, get a simple answer

Posted: Sun Sep 03, 2017 5:25 am
by Isaac
Xardas wrote:How can i disable the clickable component of a base alcove in the objects Definition?
Any (or almost any?) component can be disabled in any onInit function.

Code: Select all

defineObject{
	name = "dungeon_alcove",
	baseObject = "base_alcove",
	components = {
		{
			class = "Model",
			model = "assets/models/env/dungeon_wall_alcove.fbx",
			staticShadow = true,

			onInit = function(self) self.go.clickable:disable() end
		
		},
		{
			class = "Occluder",
			model = "assets/models/env/dungeon_wall_alcove_occluder.fbx",
		}
	},
}
It's also possible to make a null component for the purpose; and just add it to the components table.

Code: Select all

	{
			class = "Null",
			name = "initialize",
			onInit = function(self) self.go.clickable:disable() end
		},

Re: Ask a simple question, get a simple answer

Posted: Sun Sep 03, 2017 5:33 pm
by Xardas
That makes sense to me, but i can´t make it work. It gives me an error, when i place one of your Options inside the components field. It says i have to close some brackets, but i already did so.

Re: Ask a simple question, get a simple answer

Posted: Sun Sep 03, 2017 5:57 pm
by Isaac
Xardas wrote:That makes sense to me, but i can´t make it work. It gives me an error, when i place one of your Options inside the components field. It says i have to close some brackets, but i already did so.
Double check. A good text editor might even have the option to highlight matched pairs of brackets, to help with this very (common) problem.

**Another very common issue is forgetting to add the necessary coma after the previous component, when adding a new one.

Re: Ask a simple question, get a simple answer

Posted: Mon Sep 04, 2017 2:50 am
by Xardas
You were right, it was an issue of the text Editor. It doesn´t like copy paste for some reason. :roll: Now it works fine, thanks for your help

Re: Ask a simple question, get a simple answer

Posted: Wed Sep 06, 2017 12:54 am
by Isaac
Does anyone remember if there is some limitation with the way delayedCall works? (besides string arguments)

I have an object with a script component, and have tried to use delayedCall to call a function in that object's script. The function itself works, and I've called it from other functions and the console, but I find that delayedCall will silently fail to call it (Timers too!). Have I forgotten something intrinsic about this; or have I missed something else (not related to delayedCall) ?

Link to the code in question: viewtopic.php?f=22&t=14814&p=111861#p111861

Re: Ask a simple question, get a simple answer

Posted: Wed Sep 06, 2017 2:57 am
by minmay
You forgot to name your ScriptControllerComponent "controller" again.

Re: Ask a simple question, get a simple answer

Posted: Wed Sep 06, 2017 3:05 am
by Isaac
minmay wrote:You forgot to name your ScriptControllerComponent "controller" again.
Aha. I knew it must be something like that. I did try changing the letter case, but not cropping the name to controller. Thanks. 8-)