Estecka's Recent Forum Activity

  • What I'd suggest you:

    • Create a global variable, a number, and name it "SelectedChara" or whatever you fancy.
    • In the event "On E pressed", add the action: "Set SelectedChara to Gorilla.UID"

    UID is the Unique ID of the object. Here "SelectedChara" will remember which instance you intend to use.

    • On every event where you tell the gorillas what to do, add the condition: "Pick gorilla with UID: SelectedChara"

    thus only the gorilla withe previously selected UID will be affected by these actions.

    Hope it helps.

  • postimg.org/image/5429xt4l9/

    On this one I can see that pressing E brings out the menu, but is that all it does ? Is there anything inside this event that tells the overlapped gorilla that it is the "chosen one" ?

    I see nothing in your code that sorts the controlled gorilla apart from the others.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There is only 1 explanation: If x=z and b, or IF x=c, but used with an "or" and an "and" block. How can this be interpreted differently?

    Well again, I could as well interpret it as IF x=z, and IF x=b or x=c.

    Unless there is a programming rule I don't know that tells which operations must be performed first? (Like in math with multiplications and additions?)

    LittleStain - Local variables are indeed shown only when they are within their scope but what I am trying to tell you that all the other global variables are shown there too, besides the local variables. That does not help as the list is getting longer.

    If you absolutely need this many global variables, one thing you could consider is turning some of them to instance variables.

    As an example, when I needed to manage the "hive mind" of certains AIs, many of the "global" variable I used for them were in fact instances variables of a single dictionary named Hive. These still work the same way as global variables except they don't appear under the system's list.

  • What I would like:

    IF x=z

    and

    IF x=b

    or

    IF x=c

    Well you can't simply mix "or" and "and" inside a single event, because there's actually two way to interpret this:

    • "A and (B-or-C)"
    • "(A-and-B) or C",

    If you're looking for the first one, simply put one part into an event, and the second part into a sub-event like this :

    --> If A

    _____ --> If B

    ___________-or-

    ___________C

    If you're looking for the second one, it's gonna be a little more tricky indeed. And local variable seems like the best way to work around that indeed:

  • R0J0hound Nice one.

    I could refine the Capx even more by completely removing red, replacing the loop with "for each blue"

    Also, the loop doesn't have to be a "for each" at all. A "repeat 1 time" also works.

    I've rewritten my first post with what you've found. Attaching your capx and one I believe is better for understanding.

    Notably I readded an action that turns the picked Blue sideway: we can see that Blue-1 is never actually picked by the loop despite being used in its subevents.

  • I only ever managed to reproduce it using text variables before, I appeared to be half wrong there.

    Comparing Number or Boolean Instance variables still disable the bug, but apparently coordinates also enable it.

    There might be more to add to the list, I should try using different kinds of events, and see which ones enable or disable the bug.

    I know already that comparing opacity, Dimensions and Animation also enables the bug.

  • Though I have a workaround for myself and don't need help on it, I'd like to know whether this was confirmed as a bug.

  • Problem Description

    Having certain events enabled in the code even if no actions are triggered by these events, changes the way other events behave, may they be in completely event sheet.

    If a "pick with UID" is in the same event as a loop, it doesn't always pass the right UID to all of its subevent.

    Attach a Capx

    Compact : sta.sh/025e3kk223cf (as little code as possible)

    Expansive : sta.sh/0n24fz9hycm (more mechanics of the bug explained inside)

    Description of Capx

    There are two Blue sprites, with UID 0 and 1

    A loop picks Blue-0 everytime it repeats, and make it transparent when certain conditions are met.

    Blue-1 is ignored by this loop, and does nothing.

    Steps to Reproduce Bug

    • Start "or-bug.compact.capx", drag and drop the two Blues around the place
    • -> Blue-0 becomes transparent when placed outside of the lower-right quadrant of the layout
    • -> Blue-1 stays opaque no matter what. ----
    • Enable Event 2, and restart the project.
    • -> Blue-1 now becomes transparent when placed in the top half of the layout. It shouldn't. ----
    • Change the order of the conditions in Event 4
    • -> Blue-1 now becomes transparent when placed int the Left half of the layout. Expected Result ? Event 4 is the subevent of "Pick Blue with UID 0", it should only ever affect this instance of Blue Observed Result ? When the bug is enabled, if the first condition of Event 4 is true, it may affect other instance of Blue than the picked one. ? Event 4 is affected by this bug because :
      • Its mother-event "Pick with UID" is also a loop.
      • It is an -or- block
      ? To Enable the bug, you also need Event 2, which one :
      • Is placed before the loop
      • Is a subevent
      • Is an -or- block
      • Has at least one condition enabled, which compare one of the following properties in Blue :
      X, Y, Eight, Width, TextVariable, Animation, any form of Pick
      • Has no condition enabled that would compare anything but one of these properties.
      Affected Browsers
      • Chrome: (YES)
      • FireFox: (Not Installed)
      • Internet Explorer: (Not installed)

    Operating System and Service Pack

    Windows 8.1

    Construct 2 Version ID

    r216 & r219

Estecka's avatar

Estecka

Member since 21 Dec, 2015

None one is following Estecka yet!

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies