[R200] Containers and Pick by Comparison

0 favourites
  • 6 posts
From the Asset Store
Screen Comparison
$2.40 USD
40% off
See how your Logical Resolution looks on different devices
  • Problem Description

    When attempting to use "Pick by Comparison" on an Array object that's in a container with multiple instances, an error message is returned, but only for one of the instances.

    Attach a Capx

    dropbox.com/s/0u9q51qiuwev6ng/ContainerTest.capx?dl=0

    (Can't attach or do links yet; sorry. Just add the usual https protocol in front of the Dropbox section.)

    Description of Capx

    A pared-down version of an RPG battle system to show the bug. The "Begin" button in the middle will create the Units and the CharacterSheet array that is a part of their container. Two units are created: the Test_Player_1 unit and the Test_Monster_0 unit. The "TestPlayer" button on the left will simulate the player unit performing an attack. The "TestAI" button on the right will simulate an AI-controlled unit performing an attack. In both cases, the attack will create a waypoint next to the target, the unit will move to the waypoint, perform an attack roll, and then return to its starting position.

    Steps to Reproduce Bug

    • Start up the .capx on the Combat Scene - Basic layout.
    • Press the "Begin" button to spawn the Units and start the turn countdown.
    • Press either the "TestPlayer" or "TestAI" buttons. When the turn countdown has finished, it will make the appropriate unit perform an action (the "TestPower1" function in the Powers event sheet), which in this case will make it run up next to an opponent and perform an attack roll.

    Observed Result

    When the Test_Player_1 unit arrives next to Test_Monster_0, it performs the attack roll and returns to its starting position without incident. When Test_Monster_0 arrives next to Test_Player_1, however, an error message involving not being able to find the correct IID pops up. The function continues normally, however.

    I was able to isolate the event that causes this: Event 9 in the Powers event sheet, which is called from Event 3 in the Powers event sheet. This event attempts to pick a CharacterSheet array based on a comparison between a 0-index function parameter and the CharacterSheet's "ParentTag" string variable, which is the same as the "Tag" string variable for its respective Unit object. Disabling this event removes the error message.

    Expected Result

    Both should produce identical results without an error message.

    Affected Browsers

    • Chrome: YES
    • FireFox: YES
    • Internet Explorer: YES

    Operating System and Service Pack

    Windows 7 Home Premium, Service Pack 1

    Construct 2 Version ID

    Release 200 (64-bit/Steam)

  • A brief addendum: I tried altering the Pick by Comparison condition in Event 9 so that it instead picked the TurnPhase object based off of a ParentTag string variable, and it produced no error. I believe that the Array object might be the ultimate culprit.

  • Ashely Ancillary

    Here's a simplified capx that produces the error.

    https://dl.dropboxusercontent.com/u/542 ... r_bug.capx

    To reproduce from scratch:

    1. create a new project

    2. add another layout

    3. in the new layout add a sprite and array, then put them in a container.

    4. In the first layout add two events:

    every tick: create sprite at (0,0)

    system->pick by comparison Array 0=0

    5. run layout for error.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ancillary

  • Thank you both for addressing this.

  • Thanks, should be fixed in the next beta.

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