Numbering instances of an object

  • I'm working on a game with 9 individual rooms in a 3x3 grid. I have a Spawner object in the center of each room (The same object, different instances) and I need to number them according to their room. Since they are all the same object I can't just put the room number in a instance variable during editing. I also can't use multiple objects due to other reasons.

    So how can I number an instance variable based on my decision?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Are you placing them during design time or creating them during runtime?

    If you're placing them during design time, you can, in fact, set their instance variables.

    If you're creating them during runtime, you should be setting their instance variable when you create them.

  • theubie I create them during design time. I just tried changing it and noticed I can change the value for a single instance in the properties bar. I didn't notice that and I was opening the ui for all of them and changing it there.

  • Your discovery has gotten you one step closer to being an sprite instance master, grasshopper!

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