0 Favourites

Properties at runtime

  • Is there a way to make the properties exposed in the edittime.js available at runtime via runtime.js (ie: for use in events). Or do I need to make actions to set and expressions to get?

  • I'm not sure what you mean - have you looked at the SDK docs or the other plugins and behaviors that come with Construct 2? All the properties are right there in this.properties, available in onCreate().

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • I'm not sure what you mean - have you looked at the SDK docs or the other plugins and behaviors that come with Construct 2? All the properties are right there in this.properties, available in onCreate().

    I didn't see anything in the docs about making the editmode properties avaialable to events at runtime.

    When I try to access them on the object via event sheet expressions those properties that are available in the editor (such as OriginX, OriginY etc in my Ease plugin) are not there.

  • Extract from Properties

    etting property values at runtime

    In your instance's onCreate() function in runtime.js, properties are available via the array this.properties[]. This is an array of the property values. The values are in the same order as the properties were added, excluding link properties. For example, if you have two link properties followed by three integer properties, this.properties only has three elements (the three integer properties in the order they were added).

    this.properties is an array.

    The first property is accessible via this.properties[0], etc...

  • Extract from Properties

    etting property values at runtime

    >

    > In your instance's onCreate() function in runtime.js, properties are available via the array this.properties[]. This is an array of the property values. The values are in the same order as the properties were added, excluding link properties. For example, if you have two link properties followed by three integer properties, this.properties only has three elements (the three integer properties in the order they were added).

    this.properties is an array.

    The first property is accessible via this.properties[0], etc...

    That doesn't answer the question. Runtime means the game at runtime via event sheet. See previous post. Your answer is referring to the actual JS code of the plugin. I want them available in the game at runtime via the event sheet.

  • You have to expose them through the ACE (so as you said in your first post "make actions to set and expressions to get").

    That's the logical thing to do seing that properties are an array.

    It's on the dev's hand to expose and adapt those properties according to the plugin.

  • You have to expose them through the ACE (so as you said in your first post "make actions to set and expressions to get").

    That's the logical thing to do seing that properties are an array.

    It's on the dev's hand to expose and adapt those properties according to the plugin.

    That's what I suspected but I wanted to be sure. So expressions for getXxx access and actions for setXxx then I guess would be needed.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
59 6,812
BUGStudio's avatar
BUGStudio
Unread hot topic
33 38,018
Ashley's avatar
Ashley Construct Team Founder
Unread hot topic
34 6,316
kmoon11's avatar
kmoon11