using variables to identify objects

0 favourites
  • 2 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • Hi, I'm new.

    I have used variables to identify different layouts in a selection screen and it was very useful, I changed only the last part of the layouts name and that helped me use a lot less instructions.

    I would like to know if there is a way to do something similar but with objects like pictures instead of layouts, I can't figure out myself how to do.

    The situation is roughly comparable to a level selection screen VS a gallery in which you select different pictures to be displayed.

    Basically my problem is due to the fact that I can only choose an object clicking on it with the mouse while I can choose a layout writing its name so I can add expression instead of a simple name.

    Thank you for any help and hints :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can give an object a special instance variable.

    Like: Name.

    Object: Person

    give object person a name: Person.Name="player"

    To fetch it in events

    Pick Person by evaluate Person.Name="player"

    Action set textbox.text = Person.Name

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)