Idea: Instanced Behavior value overwrites in the Properties editor #2325
Replies: 2 comments
-
I see the idea. For now behavior properties are defined per object, and are not overridable for each instance. To implement this, this would need a bit of work to have the "per instance" properties displayed (in the IDE) and then overriding when creating the instance (in the game engine). |
Beta Was this translation helpful? Give feedback.
-
I think it would, as with most game engines when you write a behavior, you expose some of it's properties to the instances. When you do, you can make some of them have more HP or shoot faster. You can easily add a lot of variety and unpredictability to your game - making it feel more organic/fun. In Godot and Unity, your exported variables can be overwritten by each instance and reset button is available when they have been overwritten. Actually all the variables belong not to the object, but to the behavior attached to the object. That makes behaviors very powerful in those other engines. In GD if you want to do that atm, you have to create a lot of boilerplate in the event sheet to link instance variables to behaviors variables (actually not sure if that would do it well). Or you have to create two objects with the same behavior - use groups for the event sheet, that way give the behaviors different values. It's a bit more limited. So I was wondering if I can apply the same approach as I did with the instance variables before, but for overwriting behavior variables. Another perk of this is to have the behaviors in the properties editor- that way you can instantly (no pun intended) see what behaviors are attached to your instance. :D |
Beta Was this translation helpful? Give feedback.
-
Whenever you create several instances of an object, we can now give each of their values a unique value that overwrites the default one. These variables show up in the Properties editor very conveniently, so they are not hidden behind a click.
When you attach a behaviour to an object, that behaviour contains variables that are unique to it and very much affect the stats of the object - speed, acceleration, etc. These values would be very useful if they could be changed on a per instance basis and are visible below the instance variables in the Properties editor.
The proposal is to add the instance's behaviours to the properties editor and then make it possible to overwrite them for each instance.
It should make it much easier to see what behaviours are attached to an object (not hidden behind at least 2-3 clicks). I think that is why they are shown there in other game engines too.
I would make the behaviours more flexible too.
In any case, I would be thrilled to do the interface part of this if there is interest in it. Not sure if gd.js supports instance behaviour variable overwrites atm, so possibly won't be feasible yet, just putting the idea out there.
Beta Was this translation helpful? Give feedback.
All reactions