Creating Object Definitions Without Instancing?

This forum is currently in read-only mode.
  • Hi-

    So I'd like to be able to create objects, without instancing them in a layout. Gamemaker lets you define and organize (w/ folders) objects without necessarily having to put them in your room (layout). For example, in my game, I plan on having several different tilesets for randomization as well as monsters. However, any sprite object I create seems to need to exist on some layout layer. If I delete it from the layout, it disappears from my object list.

    Is there anyway to do this in construct that I'm missing?

    Thank you very much,

    Zomd

  • Once an object is added to a project, it is accessible from every layout.

    To place an object into a layer's object list simply copy and paste from the layout it was added to, or already exists in.

    So... basically, to get the organization your looking for, I'd suggest making a dummy layout, that you don't plan on running.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok, so I can create a dummy layout that isn't used other than to store objects? Will this run all the events associated with the object?

    So let's say I have a mob layout with 10 mobs on it, each a sprite object with its own event behavior. I copy mobs 1-3 to my main layout (where the game takes place), will the event logic execute for all mobs (1-10) every tick or just for the mobs 1-3?

    Thanks for the help.

  • why go through all that trouble when you can just drag the instances to a corner off-level and enable destroy on startup.

  • Because it's sloppy? The game I'm making is a randomized platformer, where I want to be able to not only easily add and organize new tilesets but also mobs, traps, items, etc. Creating dummy layouts or dragging off mobs and then destroying them, etc just seems kludgy to me. When I work on something, I tend to organize it as I want it to be finished as I go. If I have 30 possible mobs, I don't want the event logic running for all of them if I'm only using 10 in a given level.

    So here's a question then, if I destroy the last instance of an object in all layouts, does it prevent me from creating a new instance (like in the editor) or does it keep the object definition live? If I can create a dummy layout and then choose my enemies, destroy the others and then repeat the process at the beginning of a new level, that's workable but unwieldy.

    Edit: Admittedly I'm new to Construct, so I'm still learning it's ins and outs. Event Groups seems to be the way to keep unwanted event logic from executing for anyone else that's interested.

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