System action "Add Attribute" not working

This forum is currently in read-only mode.
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • This problem cropped up pretty randomly as it seemed to be working fine before. I have a series of objects that under certain conditions have the "Platform" attribute added to a specific instance. However, now suddenly the "Add Attribute" only seems to be adding the attribute to the object I added to the layout most recently, rather than the one matching the condition under which the action occurs.

    Any ideas? I can't use alternate methods, as the object simply must have the platform attribute under the condition.

    Thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok so a very bizarre discovery. At the layout start, I did a "For Each" loop for that object and changed its animation based on a private variable. This caused the Add Attribute to fail when used at any point in the game (and only applied it to the most recent instance of the object). However, if I avoided that loop at start up, it worked fine! Similarly, adding a "For Each" loop for that object at any other point of the game would cause it to break the Add Attribute also.

    As a workaround, I decided not to use the "For Each" loop but instead assigned a unique sequential ID to each instance of the object at design time, then used a normal For loop and assigned the animation at startup based on ID. Oddly enough, this did not break the Add Attribute function.

    Hopefully this will help anyone else facing this problem. And unless I'm missing something, looks like a fundamental bug somewhere in CC.

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