Biscotto's Recent Forum Activity

  • You can create another array object, say tempArray, and copy the the main array to it:

    tempArray Load from mainArray.AsJSON

    Thank you for your response!

    Is using a loop to copy cell by cell into a new array less performant than using the event you mentioned?

  • Is it possible to create a temporary copy of a 2d array to use within a function (without going to modify the main array)?

    If yes, how can I do it? I have not been able to find any events about this.

  • You do not have permission to view this post

  • Since you don't eisste a "break;" command, I was able to solve it by using a boolean control variable.

    Thanks for the help though!

  • Thanks for the responses.

    I was hoping that the "Stop loop" action would work like a break; command in the nromal programming (so the loop is immediately stopped) but apparently it doesn't work that way.

    My goal was to recreate via events such an event:

    	n = TableArrai.height -1;
    	for(int i = 0; i < n; i++){
     if(board[x][i] != 0) {
     	break;
    	}
     if(i == n-1){
     //Player win
     }
    

    lionz height-1 is the value I need to properly cycle all the cells in my grid (2d array). Starting from 0 I subtract 1 from the height of the array.

  • I'm a neophyte of Constrct 3, and I'm experiencing problems handling a for loop.

    As you can see from the screen below, I would like to make it so that when a certain condition occurs, the loop is interrupted and I would also like to exit the execution of that certain event. In practice I would like to make sure that the sub-event below the loop exit action is not executed, while now, even if I tell the loop to end, the check event below seems to execute anyway.

    Can anyone tell me what I'm doing wrong?

  • 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 for your response. I followed your suggestions, and this is the result (which seems to work correctly):

    If you have any suggestions to improve this code, please tell me. :)

    I understand, that if I create an instance in an event, and then I want to assign a value to that instance with an action (within that event), Construct automatically selects that instance, and not all instances of the same object. Is this correct?

    If in the same event I have to create more instances of the same object, how can I manage the situation if I want to assign a specific value to each specific instance? Is it possible to loop through all newly created instances within an event? Or do I have to create a specific function?

    Sorry for the thousand questions, but I am very determined to learn how to use this program.

  • > I would like to understand how to pass for example the UID of an instance to another specific instance.

    The UID is unique ID, each instance will have different and unique, you can't pass to another.

    > If I spawn an instance through an event of a specific instance, how can I immediately assign the value of a variable to the spawned instance?

    You can put right after you spawn an instance, like spawn enemy then set Enemy.HP = 100.

    Thank you for your response.

    Maybe I misunderstood myself in my post. What I want to pass as a reference is just the UID of the "parent instance" so that I have a unique reference of an instance.

    By storing the UID of an instance inside a variable of another instance, it will be easy for me to pass other values to that instance in the future since I have its unique id as a reference.

    For this reason, when I generate a new instance, I wanted to save immediately in a variable the UID of the main instance.

    Is my reasoning wrong?

  • Hello everyone,

    I'm sorry for the trivial question, but I'm new to Construct, and I'm learning how to use it.

    I would like to understand how to pass for example the UID of an instance to another specific instance.

    If I spawn an instance through an event of a specific instance, how can I immediately assign the value of a variable to the spawned instance?

    Thanks!

  • Hello, everyone,

    I am a new user of Construct, and I was exploring the functionality of this fantastic program.

    While running the first tutorial I noticed an annoying problem that occurs when using the dark theme of the development environment.

    As from the attached image, it is very difficult to read some keys. I would advise you to make those texts clearer, and maybe choose another colour for the hover effect (maybe a blue like the other buttons).

    I am sure that the eyes of many users will thank you! :P

Biscotto's avatar

Biscotto

Member since 11 Aug, 2021

Twitter
Biscotto has 1 followers

Trophy Case

  • 3-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Quick Draw First 5 people to up-vote a new Construct 3 release
  • Email Verified

Progress

7/44
How to earn trophies