There’s still some variable functions that exist for extension. Backwards compatibility. Technically, if the variable is only used in the extension then the object variable doesn’t need to be defined in the main scene.
Behaviors like the linked objects behavior still use object variables. It works weather the variable is defined or not. Although, the variables won’t work in the main event sheet.
While it does work. It doesn’t mean it will in the future. It doesn’t mean it’s the best approach.
does that mean that I should do either one of these things?:
1: declare the variable that I use (I have no idea where to do that)
or
2: use object property (from behaviour) for the ID system and other stuffs. Object properties can be different from instances to instances right? similarly obj variables right?
If you want more down to earth advises, you should explain what you are planning to do. For instance, you can list every function, behavior or object, you will make and explain what they do and how they fit in the whole picture of the extension.
You could even give several plans if your not sure which one to choose.
is this error message normal? I added the behaviour to the object in the scene editor. Still… it sais missing behaviour. (this message appears in the events inside the extension). when i put the event in the main scene events as shown by AnselGames, it can call dynamically just fine.
I have just read the whole page. An it still doesnt solve the issue.
According to the documentation:
“Parameter values can’t be changed with actions. If you want to give back a value to scene events, you have to create a custom expression.”
Turns out that I still don’t have access to expression functions from behaviours, (i can but only from the main scene event). And if I create a custom function from the extension (not attached to the behaviours), then my function doesnt have access to the behaviour.
there is probably a syntax i’m missing. (which is strange because the main event can access behaviour properties, the same syntax doesnt work for within the extension (inside of which the behaviour is in))
what is the way to call the behaviour properties (from the extension action functions), similarly to what AnselGames proposed?
This is true but remember in the extension you are passing an object (The first parameter) and that’s what you can’t change. You can still use the actions (provided by the behaviour) to change the id inside the object.
You can’t change the value of a property from outside of the behavior but you can add action and expression functions. GD can automatically add them for you.
Having functions allows you to modify the way values are read and set. You could do things like clamp the value or format it. Or trigger something else to happen when the value changes.