CannedEssence's Recent Forum Activity

  • Is there an elegant way to use the same Array on different Layouts, where each layout has a different width (size) for the array?

    This way, I can use a single Array in a Main event sheet, where I can use things like myArray.Width in general functions, that all my Layout-specific event sheets can reference.

  • I have been inactive from Construct since last fall.

    Why hasn't a tweening system like this been incorporated into Construct 2 proper yet? Tweening is such an integral part of adding polish to 2D game development.

  • Ashley

    Ah, cool. Thanks!

    PS: Was the issue related to the one posted here? :

    scirra.com/forum/system-pick-objects-in-or-block-unexpectedbehavior_topic72706.html

  • naelian

    Darn you, I was going for a record number of views with no replies! lol

  • Trevor10 jbadams

    I think jbadams is just misunderstanding the OP.

    Yes, every programming language (to my knowledge) allows multiple "return points", heck there wouldn't be much of a reason for one to execute "early" if that weren't the case.

    However, no programming language continues executing statements within a function past the return statement (but Construct 2 does, *ahem...).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In all programming languages to my knowledge, a return statement stops the function and returns the value to the caller.

    In Construct 2, setting a return value does not stop the function. If this was intended behavior, arguing that it makes more sense to beginners, then offer an option in an action like "Stop Function" or something.

    I feel like I have to vouch for all programming languages trying to explain why this is beneficial. For brevity, it allows for [at times far] more optimized code and it prevents tricky logic situations that would otherwise muddle code with needless variables and events.

  • Ashley

    Thank you for acknowledging the submitted report.

    However, I do still believe that this is a general System pick objects OR block bug, and not just specific to the System overlapping point condition.

    Take these events for example:

    <img src="http://cannedessence.com/construct2screens/SystemOrBlockBug.png" border="0" />

    The first event works as expected, picking Sprite with UID 0, but the second event does not work.

    I probably should have given these other examples in the original report to be more clear about the claimed issue.

    Thanks!

  • Closes fine in Windows 8 Professional and Windows 8 Enterprise.

    I think Scirra uses Windows 8, so maybe it's a Windows 7 thing.

  • Link to .capx file (required!):

    iu.box.com/s/dxkwpmokj7fiz163lgen

    Steps to reproduce:

    1. Create any Object: Pick condition (for example, Sprite: Is on-screen, or Sprite: X > 0)

    2. Nest within the above event an OR block that picks the same kind of object that the parent condition picks (for example, Sprite: Y > 300).

    3. Make some kind of action that verifies that picking was correct.

    Observed result:

    When a nested condition triggers, it picks whatever the parent picks, regardless of the nested condition that fires.

    Expected result:

    The nested condition picks the objects, narrowing down what the parent picks.

    More info:

    For those of you who can't go into the simple CAPX file provided, here's a quick screenshot of the issue:

    <img src="http://cannedessence.com/construct2screens/orBlockBug.png" border="0" />

    There are three root-level events, two of which are disabled. The two that are disabled work as expected, but the one that is not disabled is where the bug lies.

    In the first root-level event, all Sprites on-screen should be picked, then only the ones that are less than 200 or greater than 400 should be picked. However, all of the Sprites on-screen are picked, as can be verified by the Debug text object.

    The second root-level event is exactly the same as the first, except that it isn't nested within the arbitrary Sprite: is on-screen event, but for some reason it works as expected.

    The third root-level event is exactly the same as the first, except that the parent event does System: Pick all Sprite instead of functionally the same condition in this case Sprite: Is on-screen. This one works as expected.

    What truly verifies this as an OR block bug is that if you delete one of the conditions in the OR in the broken 1st root-level event, thus ridding the OR block, it works as expected.

    Most revealing is that strangely, if you disable one of the OR block conditions, thus effectively nullifying the OR block, it is still broken.

    Browsers affected:

    Chrome: yes

    Firefox: yes

    Internet Explorer: yes

    Operating system & service pack:

    Windows 8 Pro 64-bit

    Construct 2 version:

    r139

  • I'm not of much help, but seeing that this post has almost 500 views but no comments impelled me to post something.

    Looking at the JS error, and then going to line 1117 of data.js, that line references sprite19-default-000.png, which doesn't exist anywhere it seems.

    It's particularly suspicious that there are Sprite folders in the animations directory of your unzipped capx numbered through and past Sprite19, but not including Sprite19.

    An error occurs when you try and export the project.

    Seems like your project is corrupt in some way... Have you tried to rebuild the project by making a new one, making all the objects again, and pasting in the events?

  • Link to .capx file (required!):

    iu.box.com/s/erbqmp2jffivlzwrbu0y

    Steps to reproduce:

    1. Use any System pick object condition in an OR block.

    2. Place any other System pick condition picking the same objects in the same OR block after the 1st System pick condition. This should be one that will actually pick objects.

    3. Place an action that can be verified as a result of the event.

    As an example:

    <img src="http://cannedessence.com/Construct2Screens/OrBlockTest.png" border="0" />

    Observed result:

    If the first System pick object condition fails to pick any instances, then the OR fails, regardless of whether subsequent System pick object conditions would pick objects (of the same type).

    Expected result:

    The first System pick object condition to pick objects in an OR block should pick the objects for the SOL, regardless of whether one before it failed to pick any instances.

    This is the behavior for Object: condition conditions in an OR block, which is intuitive and expected.

    Using the example in the provided CAPX and image:

    Sprite: Overlapping Redpoint?

    OR

    Sprite: Overlapping Bluepoint?

    This will pick sprites overlapping Bluepoint, even if none overlap Redpoint.

    Browsers affected:

    Chrome: yes

    Firefox: yes

    Internet Explorer: yes

    Operating system & service pack:

    Windows 8 Professional 64-bit

    Construct 2 version:

    r139 (most recent stable)

  • I think I figured it out.

    It almost certainly is a bug.

    The problem is that OR blocks with the System object picking another object are functionally the same as AND blocks.

    If you do

    System: Pick Sprite by evaluating 0 //this is automatically false

    OR

    System: Pick Sprite where Sprite.UID = 0

    Then nothing is picked, even though there is a sprite with UID as 0. This shouldn't be the case.

    If you do

    System: 0 = 1

    OR

    System: Pick Sprite where Sprite.UID = 0

    Then it successfully picks the sprite whose UID is 0. This is working as it should.

    If you do

    System: Pick all Sprite

    OR

    System: Pick Sprite where Sprite.UID = 0

    it will select only the one sprite whose UID is 0. This is a design decision, but I consider it a poor one if it is intentional. It should pick all the instances of Sprite, because an OR block should stop evaluating the other conditions once it finds something that is true.

    The argument would be that for example System 0 = 0 OR System pick Sprite.UID = 0 will keep the full Sprite instance list. Even so, that IMO should be how Construct operates. They can handle the picking in a sub-event if a non-picking OR condition is true.

CannedEssence's avatar

CannedEssence

Member since 17 May, 2013

None one is following CannedEssence yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies