How is this possible? See code...

0 favourites
From the Asset Store
Two levels with two sistem Wave. with Source-code (.c3p) + HTML5 Exported.
  • It was just an idea. No need to switch, and using a guid would be better if you run multiple games.

    I wasn't sure if maybe Pick by UID is faster code than Pick by InstVar = ???

  • It is faster but I'd go with what was more readable.

  • Ok I resolved the issue. This code works and seems to indicate a C2 bug...

    Compare to code in OP to see where the bug is. The 2nd level pick by FamCard in the OR condition is picking instances outside of the 1st level pick. This should not happen.

  • Ok I resolved the issue. This code works and seems to indicate a C2 bug...

    Compare to code in OP to see where the bug is. The 2nd level pick by FamCard in the OR condition is picking instances outside of the 1st level pick. This should not happen.

    Isn't this exactly what I was talking about?

    "System compare two values" doesn't pick..

    In these "new" events you aren't referencing any familycards in the "system compare" condition..

    In the OP, you had the frame compare of the familycard in a system compare..

  • Isn't this exactly what I was talking about?

    Mmm, with respect, no I don't think so

    The trick (for this bit of code anyway) has nothing to do with the AnimationFrame check and everything to do with the subsequent FamCard.PlayerIdx checks in the nested OR Event. I can do a single FamCard.PlayerIdx = Player_MyIndex in the nested Event and the code works fine, but as soon as you add the second OR'd conditional using the Family instance var, sprite instances outside the original pick then become picked somehow. I think it's a bug.

  • Have you tried using global variable such as create object ( card) +1 to global variable and then set that variable to global.

    And using the On created trigger to set the variable to new global. And then you can use mouse with a variable in it as like If mouse is overlaping card -> get card id variable

    And then If click over card sub event here Pick object base on variable mouse variable = card variable.

    I had the same problem when I was doing rpg battle it was hard to get contruct to know which is which. I used this method and what you know it fixed it at least for five enemies that is.

  • Mmm, with respect, no I don't think so

    With respects, you are wrong.

    Little stain already has explained why.

    Moreover an OR block will execute if any of its condition is true.

    Since a system compare value does not do picking and does not rely on previously picked instances, you were basically asking for the event to execute if ever a family had some instance variable (which it has).

    So the event was executing all the time.

    Likely not a C2 bug but a user misunderstanding issue.

  • With respects, you are wrong.

    With respect, really don't need "you are wrong" replies. I've already solved the problem. I can see my own code. I can enable and disable the issue at will so I clearly see the problem. But thanks for helping KYATRIC.

  • I've already solved the problem. I can see my own code. I can enable and disable the issue at will so I clearly see the problem.

    Well, your last post wasn't indicating this at all.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • > I've already solved the problem. I can see my own code. I can enable and disable the issue at will so I clearly see the problem.

    >

    Well, your last post wasn't indicating this at all.

    Ok that's true

    If I may, two polite suggestions for a forums "moderator": Telling a person flat out "you are wrong", using those words, regardless of whether the person really is wrong or not, is "impolite" English at best. It will probably sound rude in most cases. Sarcasm is also very tricky

  • If you never tell people when they are wrong, how can they learn and improve ?

    I prefer accuracy over "politeness" (which, to me in the current case, sounds more like hypocrisy than actual politeness).

    In the post in question you made a wrong assumption about how C2 works, I told you you were wrong and explained why you were.

    I don't see the sarcasm or the lack of politeness in that.

    If I just had posted "You're wrong" and did not elaborate further, I would understand and agree with your point, but I provided an explanation to elaborate.

    I did not just "point finger" for the sake of pointing finger.

  • > Isn't this exactly what I was talking about?

    >

    Mmm, with respect, no I don't think so

    I'm not going to say you are wrong, because I have heard that would be very impolite..

    You might want to admit it yourself, though..

    It would be the respectful thing to do..

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