vee41's Recent Forum Activity

  • I expanded the example a bit, added comments and few extra columns.

    Yes, there is easier way to import large data sets: check out tutorials about importing data in XML or JSON format :)

  • loopIndex would be the current 'round' of loop. So if we for example have a for loop that repeats 5 times it would work like this:

    for 1 to 5

    .. append loopIndex to text

    Text would read: 12345 after the for loop would have finished running, adding a number each 'round' the loop does.

    What this allows us to do with arrays, we can for example go through each row with loopIndex. So the same for loop with array could work something like this:

    for 1 to 5

    .. append array.at(loopIndex) to text

    After the loop text would read whatever was contained in array values 1 through 5. I'll try to expand on that example a bit tomorrow if I got time, to make it easier to understand. :)

    In your case, you could just add rows 2-13 to the part where text is displayed (the on click event). I'll expand the example with this when I got some more time :)

  • Aha smashing! Is that a relatively new addition or have I been blind all this time?

    I think it has been there for quite a while, not implying anything about your vision! :)

  • Put events in separate event sheet, right click on event sheet you want the events to appear in, and choose "Include event sheet".

  • It does not appear as there is already a background object in the layout, the one you have outside layout. Every text will have background object associated with it, and that particular texts background happens to be the one outside the layout.

    You could:

    a) Move all backgrounds to proper positions at layout start

    b) Move single text and single background outside the layout

    c) Have all objects in separate layout, so you don't need to have any objects outside layout

  • Yup, arrays themselves don't save the data between restarts. Look into web storage object, that would probably work for you.

  • Here are few ideas. I am assuming that arrays first column holds the 'name' and second column holds some stuff that you want to appear on mouse over or whatever.

    for 0 to array.height

    .. create text at 100, 100+100*loopIndex // these could be icons or whatever, you could set icons frame/animation based on array value

    .. set text to array.at(0, loopIndex)

    .. set text.Index to loopIndex // an instance variable that defines which row of the array this text represents

    This would automagically create a text box for each of your array values.

    on mouse over text

    .. set mouseOverText to array.at(text.Index, 1)

    This would display a mouse over info from the array when you mouse over a related text object.

    Edit: Quick example

  • ebrar Sorries, fixed it.

  • Here is an ugly solution. touch path

    Not perfect, but you should get the idea. It's done with two variables and single else branch.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Use tokencount() and tokenat() expressions.

    Something like this:

    for 0 to tokencount(str, ",")-1

    tokenat(str, loopindex, ",") = wantedStuff

    .. do stuff, like set the current loopIndex into variable

  • 800+ events hmm... vee41, where are you published commercial games?!

    Just lots of prototypes, nothing commercial yet. :)

  • I tried grouping objects as a family but onDestroy seemed to destroy every single instance of the objects I grouped.

    Families would be one way to do this.

    Your destroy event is probably like this: 'Destroy object', when it should be 'Destroy family'.

vee41's avatar

vee41

Member since 12 Apr, 2012

None one is following vee41 yet!

Trophy Case

  • 12-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

14/44
How to earn trophies