Quick instance question

0 favourites
  • 7 posts
From the Asset Store
Logo Quiz with 150 prepared logos and answers, automatic question and answer mixing
  • I have a level select screen.

    On the level select screen i have 20 levels, Each are just instances of the same object.

    I also have 20 text boxes, again just a instance of each other.

    Both the level Image and the textbox have a instance variable called Level. All are numbered 1 - 20.

    If the mouse is over the textbox and the instance is level1 then i want the corresponding level image to go to frame 2. But i can't wrap my mind around this <img src="smileys/smiley5.gif" border="0" align="middle" />

    ps, I can't share my capx.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Wait never mind.. Figured it out <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Wait not quite, Its changing all the instances frame. I need the one instance at a time..

  • Check again the How do I FAQ section "Picking".

    The topic about UID and the very last one listed should give you the answer you're looking for.

  • Kyatric, I had a look at them but i still do not understand.

    Bu looking at the treads I guess im supposed to use the nth term. But I dont get what the nth is..

    Like i said above i have 20 textboxes and 20 images all of the same instance but both have instance variables called level.

    If the mouse is over the text object which has a instance of 1 then i need the image with the instance of 1 to go to frame 1..

    Any ideas?

  • Mouse:on cursor over textbox
    Sprite: .level = textbox.level
    .. -> Sprite: set animation frame

    This picks the textbox and the according sprite.

  • Thanks Kyatric I was close to that <img src="smileys/smiley2.gif" border="0" align="middle" /> But not close enough <img src="smileys/smiley6.gif" border="0" align="middle" />

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