Advanced Usage of Instance Objects

0 favourites
  • 3 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • I've passed two variables into an instance object.

    InstanceName: Carrier

    InstanceUID: 2

    How do I combine that into an expression like this?

    Set Position to:

    MyObject.InstanceName(MyObject.InstanceUID).X

    MyObject.InstanceName(MyObject.InstanceUID).Y

    It should parse into something like: Carrier(2).X and Carrier(2).Y

    But it's not taking it. I get a "Not a Behavior" error.

    Let me know if this isn't making sense.

    Thanks,

    -T

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm not sure what you're trying to do - the 'InstanceName' expressions don't make much sense to me. Can you explain some more what you're attempting?

    If you want to get expressions from an instance with a specific UID, add a subevent with a 'Pick by UID' condition, then in that event expressions will return results for that instance.

  • How do I pick a specific Instance by UID only? I have a number, I don't have the name of the object.

    And if the UID number is unique, I shouldn't need the name of the object anyway.

    When I create a sub event, I have to select the type of object first. How do I get around this and only find an instance by UID?

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