Inspection panel object components details
Inspection panel object components details
Could someone help with items in the Inspection Panel of the editor. I am trying to create a game without scripting, just using using what is available in the editor. The problem is I can't always work out what all the Components do when altered in the Inspection Panel. For example with floor_spike_trap, what does tiledamager do. Is there a list of what all the components do for all the game objects somewhere. I have been unsuccessful in finding a definitive list with explanations.
Thanks Ian
Thanks Ian
Re: Inspection panel object components details
Hi Ian,
Here is the official list of component types in Grimrock 2. Not everything has a perfect explanation, but it should help getting started. You can also check in the asset pack to see how each of the components in a given object are defined - this doesn't really require any scripting knowledge, the definitions are largely very straight-forward.
Hope this helps.
Here is the official list of component types in Grimrock 2. Not everything has a perfect explanation, but it should help getting started. You can also check in the asset pack to see how each of the components in a given object are defined - this doesn't really require any scripting knowledge, the definitions are largely very straight-forward.
Hope this helps.
Re: Inspection panel object components details
Thanks, I had found that page but it is missing objects and components. It doesn't really explain how things work. For example the timer object has a component triggeronstart. You would imagine that if this is not ticked the timer would not activated whatever it is connected until triggered itself. But when connected to a spike trap the trap starts on start. Even if the timer has disable self ticked it still fires off one time on start. This is just one example, I keep running into situations where I can't pin down exactly how things work. Thanks Ian
Re: Inspection panel object components details
That list is pretty much complete, at least as of the initial game release (some things have been added since). However, it isn't a list of objects as you pointed out - just components.
It might help to understand how an object that you place in the editor works. Here is a high-level explanation:
Think of each object as a container. It can have whatever you want in it, depending on which components are present. For example, adding a model component to an object makes it something visible to the player in game. If you want the player to be able to interact with it as well, you need to add other components like an obstacle, clickable box, health, etc. You can also enable/disable components by selecting the check-box next to each component in the editor inspection panel. Generally, disabling a component will make it act like the component doesn't exist, but there are some exceptions.
Each component also has properties and methods. These are what you will find in the scripting reference. Properties are just pieces of information about the component. For example, in a timer component, the timer interval is a property. Methods let you interact with the component and its properties - for example, setting the timer interval.
Now, to your question about timers:
No, you won't find the timer object in the scripting reference. But if you look at it in the editor (or the definition in the asset pack) you can see that it has 2 components. These are a TimerComponent and a ControllerComponent. Note that the components themselves are listed one level indented under the components tab. Everything further indented are actually properties of components. This is why you couldn't find the triggeronstart component - because it isn't a component. You can find the TimerComponent and ControllerComponent though. And if you look at TimerComponent you will see the triggeronstart property (actually, the scripting reference only lists the methods (getTriggerOnStart() and setTriggerOnStart(bool)) but you can infer the existence of the property from there). You are correct that there isn't really a lot of information though.
In the case of triggeronstart, it doesn't really seem to function correctly. Fortunately, it doesn't really need to because you can just disable the timer itself by unchecking the timer component. This will prevent it from running immediately, but when you activate the timer everything will still work properly in terms of interval, disableSelf, etc. Another approach some people prefer is to run a script when the dungeon loads which stops the timer immediately, but its really just preference.
Unfortunately, there isn't a great way to just look and immediately understand all the little quirks about the different components and their methods/properties. My advice is just to play around with it, look at the definitions in the asset pack and search around here. Most likely, someone has had the same problem before. Also, Skuggasveinn's editor tutorials are a great place to get started if you haven't seen those (he explains the timer issue in episode 7 if I recall).
TLDR: Ignore triggeronstart and uncheck the timer component.
It might help to understand how an object that you place in the editor works. Here is a high-level explanation:
Think of each object as a container. It can have whatever you want in it, depending on which components are present. For example, adding a model component to an object makes it something visible to the player in game. If you want the player to be able to interact with it as well, you need to add other components like an obstacle, clickable box, health, etc. You can also enable/disable components by selecting the check-box next to each component in the editor inspection panel. Generally, disabling a component will make it act like the component doesn't exist, but there are some exceptions.
Each component also has properties and methods. These are what you will find in the scripting reference. Properties are just pieces of information about the component. For example, in a timer component, the timer interval is a property. Methods let you interact with the component and its properties - for example, setting the timer interval.
Now, to your question about timers:
No, you won't find the timer object in the scripting reference. But if you look at it in the editor (or the definition in the asset pack) you can see that it has 2 components. These are a TimerComponent and a ControllerComponent. Note that the components themselves are listed one level indented under the components tab. Everything further indented are actually properties of components. This is why you couldn't find the triggeronstart component - because it isn't a component. You can find the TimerComponent and ControllerComponent though. And if you look at TimerComponent you will see the triggeronstart property (actually, the scripting reference only lists the methods (getTriggerOnStart() and setTriggerOnStart(bool)) but you can infer the existence of the property from there). You are correct that there isn't really a lot of information though.
In the case of triggeronstart, it doesn't really seem to function correctly. Fortunately, it doesn't really need to because you can just disable the timer itself by unchecking the timer component. This will prevent it from running immediately, but when you activate the timer everything will still work properly in terms of interval, disableSelf, etc. Another approach some people prefer is to run a script when the dungeon loads which stops the timer immediately, but its really just preference.
Unfortunately, there isn't a great way to just look and immediately understand all the little quirks about the different components and their methods/properties. My advice is just to play around with it, look at the definitions in the asset pack and search around here. Most likely, someone has had the same problem before. Also, Skuggasveinn's editor tutorials are a great place to get started if you haven't seen those (he explains the timer issue in episode 7 if I recall).
TLDR: Ignore triggeronstart and uncheck the timer component.
Re: Inspection panel object components details
Thanks Eburt for such a good reply. I'm making a rod for my back by trying to do complicated things without going to scripts. I suspect there are some who get put off having a go because they do not program. I want to make an interesting game without scripts to show it can be done. Thanks again Ian
Re: Inspection panel object components details
I have certainly seen a lot of people who want to make interesting content without scripting. And by and large, if you only want to do things similar to the original game, then you can probably mange.
The only problem is that there are so many little things that just won't work quite right the first time through. You can spend hours on each of these problems if you don't understand the basics of scripting and the way the game works behind the scenes. Or, you can put in a couple days up front and get enough understanding that when things don't work as expected you can track down the problem. I'm not saying you have to script, but learning a bit about it can help tremendously even if you're just using timers and counters.
Either way, best of luck!
The only problem is that there are so many little things that just won't work quite right the first time through. You can spend hours on each of these problems if you don't understand the basics of scripting and the way the game works behind the scenes. Or, you can put in a couple days up front and get enough understanding that when things don't work as expected you can track down the problem. I'm not saying you have to script, but learning a bit about it can help tremendously even if you're just using timers and counters.
Either way, best of luck!
Re: Inspection panel object components details
You misunderstand triggerOnStart. It means that the timer triggers its connectors when it starts running as well as after its timer interval elapses; without triggerOnStart set, it will only trigger its connectors when the interval elapses. It does not determine whether the timer starts running right away or not; all TimerComponents start running as soon as they are updated, until they are stopped, paused, or disabled.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Re: Inspection panel object components details
I found it mildly inconvenient that Timers would start automatically as soon as a level loads. It's no extra effort of course to have a Script Object that simply stops the timers the moment the level loads. The problem I have (conceptually) is that I do not know the Order of Operations when a level loads.
For example, is it:
1) Level Loads
2) Timer starts
3) Script executes to stop the timer
or is it:
1) Level Loads
2) Script executes to stop the timer
3) Timer never starts
or is it:
1) Level Loads
2) All "default/global" events trigger simultaneously in a parallel/multi-thread fashion
I'm sure this is likely already been answered somewhere, I'm just posting my thoughts for funsies.
For example, is it:
1) Level Loads
2) Timer starts
3) Script executes to stop the timer
or is it:
1) Level Loads
2) Script executes to stop the timer
3) Timer never starts
or is it:
1) Level Loads
2) All "default/global" events trigger simultaneously in a parallel/multi-thread fashion
I'm sure this is likely already been answered somewhere, I'm just posting my thoughts for funsies.
Re: Inspection panel object components details
All you have to do to prevent a timer from running on initialization is disable the TimerComponent...
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Re: Inspection panel object components details
But you can disable the checkbox "timer" (you find it in the editor at the components of every timer).
Then the timer doesn't start at levelinitiation. You don't have to do this by scripting.
Then the timer doesn't start at levelinitiation. You don't have to do this by scripting.