Action based on UID

0 favourites
  • 3 posts
From the Asset Store
Act on your instances, get/set their properties and variables only thanks to their UID. No more picking trouble! Plugin
  • I have a ship with 4 turret instances on it, set to 4 ImagePoints. I'd like to keep them on those points when the ship moves.

    The action I tried was:

    System Every Tick - (TurretObject) Set position to (ship.ImagePointX(Turret.UID), ship.ImagePointY(Turret.UID))

    However, it sets them all to ImagePoint0.

    Additional question - How should I be using groups? I read about how objects can be grouped for picking purposes. It doesn't apply for my current project because I only ever have one ship at the moment, but if I had multiple ships I might want to use this logic. However, when I made a group with the ship and turret and added my 4 turret instances to the ship, it made 4 more ships too! Would I need a separate turret objects for each turret rather than instances of the same turret object?

  • I would try the pin behavior which lets you select which image point you want. No need to do an every tick, as it takes care of that for you.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks, pin was what I was looking for.

    Forgot to look in the behaviors.

    For future reference in case someone searches into this thread

    Pin Behaviour

    construct.net/en

    Pin to Image Point -

    construct.net/en

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