Freeze on Array loop Mathematical equation

0 favourites
  • 4 posts
From the Asset Store
For Adventure, Action, Heroes, Sci-fi and Action-RPG games.
  • Problem Description

    • Freezes the entire browser without error warning.
    • Aparently caused for trying to do an ecuation in an array inside a loop (any kind of ecuation, example "Array.at(x,y)+1")

    Attach a Capx

    https://drive.google.com/file/d/0B7w6u3 ... sp=sharing

    needed pluggin (error not affected by puggin): https://drive.google.com/open?id=0B7w6u ... EI0UEhNa2s

    Description of Capx

    It creates a noise array

    Steps to Reproduce Bug

    • Run the CapX to see it freeze
    • Change action "Set Value getground to 1"
    • Run CapX to see it work
    • Change action back to "Set value getground to Array.At(getx,gety)+1"
    • Change the Array action to "Set Value at (0,0) to getground"
    • Run CapX to see it work

    Observed Result

    The CapX freezes if an ecuation uses the array value.

    Expected Result

    Resolve the math ecuation.

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    Win 7 SP1 64bit

    Construct 2 Version ID

    Beta 245

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you intend to write more events to this (dont know if thats gonna be the case), that wait will bring you hopeless problems.

    Besides that.

    Use Browser plugin to log Sprite.UID&"/"&loop&"**"&Pico to the console in your last loop.

    'loop' in there is a global variable you add 1 to in that last event.

    Watch it run in Chrome's console.

    At any iteration you (mostly) write a bigger number on a 'next' index in the array. It rarely resets.

    So next iteration, when that next index is used, pico grows according, and keeps growing.

    When the sprite 50 is picked, it allready does like 120.000 iterations. At that moment you write the same value on the same place in the array like 3000 times.

    It is freezing because you created a near endless loop.

  • Intresting, ill check the logic again, thanks

  • The .capx uses a third-party addon "Gashapon". Please see the bug report requirements, we don't accept projects depending on third-party addons. Closing.

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