RCLima's Recent Forum Activity

  • I must do a review. But in this guide, it teaches us how to create classes, but not access instance variables of an object. In the example I gave, the object (which is a sprite) is called "position".

    From what I saw, in this tutorial, I must conclude that we can only access the first instance variable of an object, through the code "getFirstInstance", but the others is impossible, it would be necessary to create variables in the script itself instead of accessing the instance variables already created in the object properties in Layout.

    But I will reread the whole article, which is very good for teaching programming logic. I just miss a tutorial that teaches how to manipulate the variables that are present in the properties of objects (the sprites) mainly on the part of instance variables.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I created an object and generated an infinity of copies of it. All inherited 3 variables from the main object.

    Now I need to access 1 of these 3 instance variables, from each copy.

    To improve the explanation I will give names to these instance variables: "music", "steps" and "pizza".

    I need to compare the value of the "pizza" instance variable of each copy object.

    To make this distinction between copies I decided to use idd.

    Now follows the failed attempt to solve this problem through javascript:

    if(runtime.objects.position.iid(0).pizza == "Pepperoni")

    {runtime.globalVars.total_Pizza++;}

    This logic didn't work, but what would be the correct logic to access an instance variable from an object copy through javascript?

  • I'm going to study about the UID and see if it solves the case. Thanks!

  • But in that case I would have to question whether object A is touching object.

    But if we have several objects, from A to Z, and object A touches any one of them, object A is unable to say the name of the object that is colliding. Furthermore, it is impossible for object A to access information from a variable of the object that collided with it.

  • I need to identify the name and value of a variable when an object collides with the event object.

    The event object when colliding with something needs to know the name and state of the collided object.

  • Sempre que aperto o "play" para iniciar visualização do projeto ele vem apresentando erro. Gostaria de saber se isso só está acontecendo comigo e como que posso solucionar esse problema. - Não sei se isso ocorreu depois da última atualização.

    Veja na imagem:

    Whenever I press "play" to start visualizing the project, it has been showing an error. I would like to know if this is only happening to me and how can I solve this problem. - I don't know if this happened after the last update.

    See image:

    Note: My language is Portuguese, follow the text of the problem notice translated into English ...

    "Preview failed to start. Try restarting Construct 3 before trying again."

    Tagged:

RCLima's avatar

RCLima

Member since 6 Jan, 2020

None one is following RCLima yet!

Trophy Case

  • 4-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

6/44
How to earn trophies