0 Favourites

[195]Instance Pick with UID BUG

  • Problem Description

    Instance Pick isn't picking instance object even though the number is supplied.

    **Note** I also notice it didn't work in 194.2 went a few versions back to test it there**

    Attach a Capx

    ____ Upload a Capx to this post ____

    Description of Capx

    Light Blue Box is suppose to jump from one dark blue box to the other

    Steps to Reproduce Bug

      Try to pick something through UID method of object

    Observed Result

    Event doesn't trigger when it should

    Expected Result

    Run Event actions

    Affected Browsers

      Doesn't work in Chrome or IE

    Operating System and Service Pack

    Win 8.1

    Construct 2 Version ID

    195

  • Sorry to butt in but I think you have some errors here. Firstly no light blue sprite is initially overlapping a dark blue, so nothing will ever happen.

    Try this. I moved the light blue over a dark blue in the layout, and also added a Family to do the picking, and set the light blue to top of layer.

  • No the blue sprite isn't over the dark one initially. Direction behavior is attach to the blue sprite. I didn't use families because the person I was trying to help doesn't have a license to use families. That is when I notice it didn't work. So user that have capabilities to use family is fine for the free not so good. The person was doing a teleport event. So they move over the portal hit space and move to the next spot. If you can't get it working the way it is without families then it must be bug?

  • oh ok missed the 8 direction behaviour. Understood about Families, I just saw your av had a licence medal thing.

    Edit: I still don't think it will work without Families. You're trying to have two SOLs in one condition as far as I can see. You could introduce a variable to store UID but then I understand you're trying to find if this is a bug.

  • Yes I tried storing it in a variable and still it didn't trigger. I even type in the UID to just test and still didn't trigger. Families are my holy grail its just people use the free version before they buy and if they have something that says its suppose to select something by UID and it doesn't could be a turn off. But I could of sworn I did this before I don't know what version because I downloaded the updates but hadn't really used in awhile.

  • This works ok. Don't forget the Pick All

    [attachment=0:360k9dvo][/attachment:360k9dvo]

  • Ok so you have to attach the 'Pick All' for it to actually work cause I just added that on to the file I attached and it does what it is suppose to do now. New users wouldn't think that they would have to do that mainly since the manual documentation doesn't state that. It just states 'Pick instance with UID' to pick an instance of the given number...they wouldn't think to also have the system 'Pick All' part of the event condition. But that would have to do...regardless Scirra would have to see it as a bug to do anything about it anyhow no? But thx cause I wouldn't of thought of doing that.

    When I show people I try to show the cleanest way to achieve it and not create unnecessary global variables.(When I can) But I could of sworn I use to do it without the System select.

    [attachment=0:131tcvsi][/attachment:131tcvsi]

  • I guess it comes down to understanding the picking, and that it's like a filtering process. So after the 'is overlapping' there is 1 Sprite2 picked from which to further filter. So you need to pick them all again to reset the filtering. I feel I should know this, but it seems that pick by UID only picks from the current SOL, rather from the entire pool of objects (I don't pick by UID very often). I just did a test that shows this. (i.e. you CAN pick by UID right after another pick event, as long as the picked objects contain the one you want to pick by UID). I'll be interested to see what Ashley says.

    But I agree the manual is a bit scant in some areas...

    Re global variables, I'm not sure why people are so reticent to create variables... But I agree reduce globals wherever possible, which is why I created a local.

  • Ah ha I thought it would trigger the filter to auto reset when you called the pick by Instance uid.

    RE: Variable

    Just think its odd to move a variable to another. When you can just use the variable that is already create and holding the value you need

    Kinda like

    a=cat

    b=a

    print b

    when you could of just said print a

  • Ah ha I thought it would trigger the filter to auto reset when you called the pick by Instance uid.

    It will reset on the next non sub-event.

    edit: are you sure your above works... if it does it would be just luck I think. As you've lost the Sprite2 that was overlapped with.

    RE: Variable

    Just think its odd to move a variable to another. When you can just use the variable that is already create and holding the value you need

    Kinda like

    a=cat

    b=a

    print b

    when you could of just said print a

    I'm not sure what you're referring to, there's only one variable above. In my case using a Local just reduces its scope, which is normally a good thing. Anyway I'm out this is enough for Ashley to sort through.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Yup it works. Have it up an running now. I just look and I see what you mean but it works regardless.

    Maybe because there is the System Filter and then there is the Object Filter. So the System Filter List is separate from the Object Filter List so it doesn't get overwritten?? I think that is what it is. . But I could be wrong.

    As for the variable The teleportTo is an instance variable that you move to a local variable when you can just called the instance variable like you did to assign it values into another variable. Not to manipulate but just to use the information inside. That what I mean.

    Thx though we have something functioning.

  • Closing as not a bug: as per the normal way conditions work, they filter down the picked objects. A later condition cannot pick objects that are not already picked, with the sole exception of "pick all".

    Therefore as your events are, the "pick by UID" condition can only pick the object meeting the "is overlapping" condition, and no others.

  • Ok thanks and noted I thought it would create an all new pick filter

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