[Engine] Else block not triggered

0 favourites
  • 3 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Problem Description

    ELSE block not triggered

    Attach a Capx

    https://drive.google.com/file/d/0B-_hh3 ... sp=sharing

    Description of Capx

    An 25by25 array is filled with "Entities" as such that :

    Array.at(floor(Entities.X/32),floor(Entities.Y/32))==Entities.UID

    Steps to Reproduce Bug

    • Run the capx (it is an "Engine" missbehaviour bug)
    Using Canvas 2D renderer
    Picked instance at ( 8,4)=1 Browser_plugin.js:580
    Number 1 Browser_plugin.js:580
    add1 8 Browser_plugin.js:580
    Picked instance at ( 9,4)=2 Browser_plugin.js:580
    Number 1 Browser_plugin.js:580
    add1 9 Browser_plugin.js:580
    add1 10 Browser_plugin.js:580
    Picked instance at ( 11,4)=3 Browser_plugin.js:580
    Number 1 Browser_plugin.js:580
    add1 11 Browser_plugin.js:580
    add1 12 
    [/code:308equ79]
    
        
    [b]Observed Result[/b]
    `"Stop loop at  "& PosIndex` is never logged in browser console/
    
        
    [b]Expected Result[/b]
    Either one of these must be logged in browser console:
    [ul]
        [li] "Stop loop at  "& PosIndex
       [/li][li] "Number " & Entities.PickedCount[/li][/ul]
        
    [b]Affected Browsers[/b]
    [ul]
        [li] Chrome: YES (Version 36.0.1985.125 m)
        [/li][li] FireFox: YES (Version 31)
        [/li][li] Internet Explorer: YES(Version '11.0.9600.17207 UV 11.0.10)[/li][/ul]
        
    [b]Operating System and Service Pack[/b]
    Win7 Ultimate, Service Pack 1
        
    [b]Construct 2 Version ID[/b]
    R175(64Bit) built at 17:04:53 Jul 2014
  • Closing, I do not see any evidence of a bug in this report. It suggests the event in question is simply never true so the 'Else' block always runs instead. Please post again with much more detail and evidence as to how this is not a mistake in your own events if you really think this is a Construct 2 bug.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I modified the ".capx" to introduce an else (at 8) for the "pick instance ..." (at 5) and it seems that "pick instance with" is false when no instance has been picked.

    The manual says :

    [quote:1euqybjb]Else

    Run if the previous event did not run. Note that this condition does not pick any objects: if it follows an event that picks objects, in the Else event all instances revert to picked again. Else can only follow normal (non-triggered) events. It can also follow another Else event with other conditions to make an "if - else if - else" chain.

    [quote:1euqybjb]Pick by unique ID (UID)

    Pick the instance matching a given unique ID (UID) number.

    The behavior and those 2 manual entries suggest that the event at position 5 didn't run. I think that a more elaborated writing to explain : "Run if the previous event did not run" for the "ELSE" event or special "events" like "pick by" should have a notice like :

    [quote:1euqybjb]Pick by unique ID (UID)

    Pick the instance matching a given unique ID (UID) number.

    NOTE : if no instance have been picked, this event is considered as not ran.

    As you can see due to confusion, I have an unnecessary check at position 6. Here is the "before"/"after" figuring it out (the 2 versions are what I intended the original capx to do!):

    Before:

    After:

    I think that this example or a simplified variant could be introduced in the manual.

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