How do I change a string/variable per object copy based on a UID/IID? (simplified)

1 favourites
  • 5 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • Since my first post had a large project with way too much, I've simplified it down to just the tutorial + my issue. I'm a visual learner, so if you could send screenshots with your explanation, that'd be great.

    Original Post:

    construct.net/en/forum/construct-3/how-do-i-8/change-variable-per-copy-169181

    Project Link:

    drive.google.com/file/d/1aVJyr-oKVTPCgqKzp68IVrPWmOKcaAds/view

    Screenshots:

  • I don't have much time, so try this.

    Goal = Get your player to interact with the right item.

    Easy way =

    1. Add 1 invisible sprite. 1 pixel collision.

    2. Pin that invisible sprite to player front with some spacing. Once player turns, that pinned sprite should remain in front. This will simplify your code. no need for directional offset.

    3. If it is single player, add local var to player obj called interaction_target or something. When invisible sprite overlap something interactable, set its uid to player's interaction target. If you have many overlapping stuff, pick top.

    4. When talk is called, send UID. Check again if that UID can be talked to. If true, display msg.

    Complex way = Ain't anyone got time for that~ Let's make it simple

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you for the quick and easy response. I'll see if I can figure this out soon. Means a lot that you were chill and helpful at the same time!

  • I don't have much time, so try this.

    Goal = Get your player to interact with the right item.

    Easy way =

    1. Add 1 invisible sprite. 1 pixel collision.

    2. Pin that invisible sprite to player front with some spacing. Once player turns, that pinned sprite should remain in front. This will simplify your code. no need for directional offset.

    3. If it is single player, add local var to player obj called interaction_target or something. When invisible sprite overlap something interactable, set its uid to player's interaction target. If you have many overlapping stuff, pick top.

    4. When talk is called, send UID. Check again if that UID can be talked to. If true, display msg.

    Complex way = Ain't anyone got time for that~ Let's make it simple

    Could you send some visuals so I have more of an understanding as to what's going on?

  • NVM, figured it all out on my own. Thank you for the help anyways!

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