ramones's Recent Forum Activity

  • Yeah - trigger once only cares if the condition was true or false last tick. It doesn't matter what objects the condition is true for.

    Your event 3, for example, will fire once when there is any Sprite with Color = 1, and then it won't run again until there is at least one tick where there is no Sprite with Color = 1.

    In this case there is always a Sprite with Color = 1 so the event never runs again after the first time.

  • You could give each button a number variable (1-9) and then use 'for each: ordered' to loop through each button ordered by number and append it's value to a text variable.

  • Here's an example with one text object:

    [attachment=0:1myvpe7u][/attachment:1myvpe7u]

  • You can set the background size to Text.TextWidth, Text.TextHeight + some border. The only problem is that the TextWidth/Height doesn't update immediately when you change the text so you need some delay.

    You might keep track of the old values in instance variables so you can detect when it has changed and update the background size accordingly.

  • Use the Timer behavior instead of "every x seconds". You could add Timer to the text object and keep it's time scale at 1.

  • text-align: left ?

  • The system loops (for/repeat) work with loopindex. The array loop (for each element) works with Array.CurX, Array.CurValue etc. You can't mix the two and use Array.CurValue with a for loop or use loopindex with an array loop.

    When you use a value after x seconds, you need to think what will the value be at the time the action is run.

    If you have

    set value to 5
    wait 10 seconds
    set text to value[/code:20elajpr]
    then the text will be set to whatever [i]value[/i] is after the 10 seconds - it's not necessarily 5 any more.
    If you're using loopindex or Array.CurValue then it certainly won't be the value you want after x seconds.
    
    So maybe a different approach like:[code:20elajpr]
    every x seconds [or on timer]
    if array is not empty
        get and remove first value from array[/code:20elajpr]
    
    or if you want to keep the array intact:[code:20elajpr]
    global number index = 0
    every x seconds [or on timer]
        color = array.at(index)
        add 1 to index[/code:20elajpr]
  • This is great. The framerate dropped down to 10fps for me at the last section playing fullscreen. I couldn't tell at first if the slowness was intentional or not because it's so abstract

    The artwork is amazing.

  • Yep that's right.

  • Yeah basically the actions of any object that allows you to pick multiple instances (eg. Sprite, Text, Array...) have the implied 'for each' loop.

    [attachment=2:rdag3jv4][/attachment:rdag3jv4]

    This:

    [attachment=1:rdag3jv4][/attachment:rdag3jv4]

    is equivalent to:

    [attachment=0:rdag3jv4][/attachment:rdag3jv4]

  • Search for "floating point rounding error" and you'll see why 1.1 + 10 - 10 is not equal to 1.1.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you put the selection box over all four sprites then they'll all be picked but the function only gets called once. Even though you have four objects picked, only one UID gets sent to the function so only one of them has their opacity changed. That's why you need the 'for each'. You want to call the function for each of the picked objects.

ramones's avatar

ramones

Member since 17 Apr, 2012

Twitter
ramones has 4 followers

Trophy Case

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

Progress

15/44
How to earn trophies