How do you make your own attributes

This forum is currently in read-only mode.
  • Attributes seem like they might be useful, but I have no idea how to use them because they don't show up in the event editor, am I missing something?

    The the extent to which the wiki goes into it isnt exactly enormous : "You can add your own attributes and use them in the event sheet editor, but they do not have any built-in effect. "

    Also what makes them different from familys? - which seem to have pretty much the same use apart from one is a tickbox and one isn't.

    I'd have thought you'd edit the attribute in its own kindof global event sheet or something... I dunno.

    The only place where they do show up is the expression editor bit which also shows all the global objects etc. (but nowhere else does)

  • Attributes are kind of an even more general form of families. Families all have to be the same plugin type eg. Sprites - Attributes don't have to be. They are literally an on/off flag - like you can set a bunch of any old objects to "Solid", and then make an event "Bullet collides with solid". Then "Solid" can refer to boxes, sprites, tiled backgrounds, or anything, which it couldn't if it were a family. However, you can't use events to relate to an attribute in general like you can with a family.

    You can edit attributes by the 'Edit attributes' link in object properties (at the bottom of the list of checkboxes), or in application properties.

    The built-in attributes usually have an effect on various behaviors or plugins. The Platform movement won't fall through 'Solid's, the screen centres on objects with 'Centre view on me', and some plugins like the RTS movement allow you to pathfind around objects of a certain attribute.

    And on second thoughts, I think I'll go paste this on the wiki

  • When I click edit attributes it gives me a list of attributes, then I add my own one, then there is an "Edit attribute" button which just renames it. It doesnt show up in the event editor so I can't actually set them to do anything

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can enable the attribute you've added on some objects, then test for it in object parameters (such as on collision with myattribute). You can also pass it to some plugins (such as RTS behavior - navigate around myattribute). This could be useful if you want to separate out different types of solid object, for example.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)