It is necessary to manage the sprite, which is indicated in one of the arguments of the function.

0 favourites
  • 6 posts
From the Asset Store
Footsteps SFX One contains 400 sounds of steps and jumps on different surfaces.
  • Hello! It is necessary to manage the sprite, which is indicated in one of the arguments of the function, for example.

    I make sliding alerts that have my own text and icon, but I'm too lazy to combine many icons from the panel itself a certain position, an example in the photo:

    Tagged:

  • I am not sure I understand your question, but what you are probably looking for is hierarchy feature.

    construct.net/en/blogs/construct-official-blog-1/lets-talk-scene-graph-1569

  • How do I manage the sprite, (for example, change the position) the name of the sprite I need in the function argument

  • You can forward the Sprite object's UID as a function parameter.

    Or forward multiple UID's, or variables which help you define specific objects.

    This works as follows:

    1. Right-Click the function, and select + Add parameter.
    2. Then when calling the parameter, you can forward the UID to the function.
    3. And within the function, you can then use the parameter "which works like a local variable" to pick the object you forwarded.

    For example:

  • Isn't it possible to just specify sprite_player as a parameter? And then do this expression sprite_player.X = 50? Or analog..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I told you how you can forward a unique identifier over a function.

    Wasn't that the question?

    This helps to pick a specific object, out of many.

    If you only have a single sprite instance, then there's no need to forward this information. In that case, just apply the re-positioning directly.

    But if you have multiple instances of a single sprite, this is how you can pick a specific one, over a function.

    Otherwise please share your project (or an example file) and give a more detailed explanation of what you're trying to achieve.

    If you're just trying to keep multiple objects at relative positions to another sprite, use the hirarchy feature as described by dop2000. But that has nothing to do with a function.

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