LoobyLoo's Recent Forum Activity

  • I believe there might be a misunderstanding regarding my question. Allow me to elaborate in detail.

    I'm trying to create a typewriter effect in Construct 3 by appending text from an array to a Text object that already contains text. While I can use the 'Append text' action and it works perfectly, the issue is that if I simply append the text, the typewriter effect is lost.

  • Thanks for your response, it did confuse me a bit, I'm still figuring out why it is not working. :(

    Here the c3p.

  • 🙄, I use JSON Array, because it is convenient.

  • I'm trying to create a typewriter effect by appending text from an array to a Text object. But it doesn't work, what I'm doing wrong here? :(

    I found the logic here from an old post, based on that I tried with array but it doesn't work.

    Here the c3p.

    Tagged:

  • Hi 🦁!

    I can make it work with Global Variable,

    on every tick → set TestGV → Value MyArray.At(5,2)

    var valueOfTestGV = runtime.globalVars.TestGV;
    runtime.callFunction(valueOfTestGV);
    

    but it doest work with local variable, like this

    var valueOfTestLV = runtime.localVars.TestLV;
    runtime.callFunction(valueOfTestLV);
    

    (I'm not sure if "runtime.localVars." is valid code.)

    I didn't think passing a function name as an expression from an array could be this complicated.

    If anyone knows, please help.

  • var functionName = String(MyArray.At(5, 2));
    runtime.callFunction(functionName);
    

    It's not working; please help.

    I really like using arrays to control different parts of the code because they're so handy. :)

  • I have created many functions in the event sheet, and I want to call them dynamically by fetching their names from an array. I have a JSON array that is converted to a local array using AJAX, and the array contains the names of the functions that I want to call. For example, one of the functions is called “MyRoseFunction”.

    To call the function by name, I have added a JavaScript script in the action area of the event sheet, and I have used the runtime.callFunction method. When I pass the function name as a string, like this:

    runtime.callFunction("MyRoseFunction");

    It works fine and the function is executed. However, when I try to pass the function name as an expression using the At method of the array object, like this:

    runtime.callFunction(MyArray.At(5,2));

    It doesn’t work. Please help.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you so much. 😍

  • Yes, I fetched this ans from a Community post where the founder of construct says,

    You can use the web export and publish it to the Microsoft Store using PWABuilder. That's what we did for Construct 3 itself.

  • I have multiple instances of a sprite called 'BUTTONS,' each with a unique instance variable (String).

    Upon starting the layout, I'd like to create/spawn a new sprite over each 'BUTTONS' instance, using a specific animation from the 'MyLOGOSet' sprite, based on the instance variable value.

    For eg, if a 'BUTTONS' instance variable is set to LOGO1, I want to create a 'MyLOGOSet' sprite over it and set the animation set named LOGO1 of the 'MyLOGOSet' sprite.

    I hope this makes sense. Please guide me on how to achieve this. I believe it might be achievable with a For Each loop, but I'm not sure as I'm still learning loops.

  • Thank you. I have a question: Is there an alternative expression similar to "between" that allows me to specify certain values like 1, 2, 4, 20, 31...

    I tried using the bellow based on a suggestion in a post,

    but it didn't work. Then I referred to the manual and discovered this, I followed the same steps,

    but it still doesn't work. What am I missing?

  • You could reduce the number of events here; fewer lines of code would be more efficient to work with (maybe not the efficiency you're after though!)

    Touch: On tap gesture on TagText

    ---> TagText: TAGOrder_Text is between 1 and 3

    ------> System: Pick all TagText ... TagText Set font colour to rgbEx(0,0,0)

    ------> ... TagText Set font colour to rgbEx(0,0,0)

    Initially, I thought it would be quite challenging, assuming we would need to use a loop. However, the solution you provided is much easier and efficient. Thank you. It works.

    Just one doubt, generally what should I put for the value? I understand that in my specific case, since I have 3 TagText items, I should put Lower: 1 and Upper: 3. However, when it comes to the the value, I put 1 and it works fine.

LoobyLoo's avatar

LoobyLoo

Member since 10 Jul, 2023

Twitter
LoobyLoo has 1 followers

Trophy Case

  • 1-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

6/44
How to earn trophies