How do I set the animation frame of each instance of an object?

0 favourites
  • 11 posts
From the Asset Store
Selection frame like in RTS games, works both on mobile and desktop devices.
  • Hi people,

    Link to capx = we.tl/t-lSHRQZshAl

    There are two layouts. The first layout has a selection of 21 objects from which the user can choose 7.

    When the user clicks on an object/icon a tick becomes visible on that icon.

    The second layout puts each of their selection into a timeline of 7 icons.

    In essence I need to get each icon that has been selected to show up on the timeline on the second layout.

    So far I have had success setting the first icon on the second layout from the selection layout by setting a global variable to animation.frame and then setting that to the animation.frame of the first icon in the second layout but that's where my knowledge ends...

    Seems like I need a way of doing some kind of ordered expression or something?

  • I would actually do this with an array, it would be super easy if you know how to use them. As it stands another option is to have an instance variable on the thumbnails for tracking numselected so first picked is 1, second picked is 2. If you deselect something you set all instance variables to var-1. Then on the end of layout you have 7 instances numbered 1-7 and you can pull these into global variables and assign them on the next layout.

  • Thank you- arrays are alien to me at this time but how I do the picked event?

    And then how would I get the second layout to recognise those picked?

    Very sorry for needing it broken down!

  • There I sorted it, if you understand it then you can continue it so all 7 are recognised : dropbox.com/s/rzf2ej9zj1h2ig3/Set%20icons.c3p

  • Ah massive thanks I will check this in my break.

    Do you have a way I can make a donation as a way of saying thanks?

  • sure, paypal.me/plinkieant

    on the construct discord I offer some assistance for donations to here, thanks!

  • Ok thanks.

    I will check the capx in a few hours and send :)

    I will definitely need further assistance with some things so stick around!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sure you can find me on the discord ant#4434

  • Hi plinkie the selection doesn't seem to be working properly--won't allow me to select more than 1 icon on the selection page. Is yours working properly?

  • Technically they are selected it's just a problem with the tick display logic. The variables work but visual tick has problems, it will need to be changed a bit. Maybe you can have each tick overlapping and say if tick is overlapping. You should go on discord though as there is no PM option here and the thread becomes a bit like spam.

  • Ok I wondered if it might be

    i will check thanks again , will be back in touch shortly

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