Spawn object without Instance

0 favourites
  • 7 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • Hello guys, coming back for some of your knowledge. (yummy?)

    Anyway, do you know if there is a chance to spawn a new object without having to include an instance in the layout?

    I dont know if it affect the performance by that much but I think its kind of annoying to have an instance of the object in the layout, and more when its an object that when its bounded to the layout, because the instance will appear in the layout but its not supposed to until it is spawned <img src="smileys/smiley5.gif" border="0" align="middle" /> kind of destroying my head actually.

    So, is there a way to do this?

    Thanks in advance!

  • on start of layout destroy object and you're done.

  • Or put it on another layout where you put all stuff that's not supposed to be on your layout from the start.

  • try create object

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I usually just destroy them on layout start.

    Depending on the type of object, you can also start it with 0 opacity if you don't want to destroy it for behavior reasons. That way it won't show until you intend it to.

  • I place all object which i dont need from the start on a sepperate layout without an eventsheet.   then when I need them on another layout, you can have any object spawn a new instance of that object on the current layout :)

    Its a great approach :)

    Having objects rendered and destroyed on layout start is a waste of load time.

  • Lenneart,

    I'm trying to migrate to using your technique of placing all the graphics on a layout sheet that acts as a "pool" for me to create instances from as I need them. I'm having one problem though. I have a family of sprites that each have distinct names as a name instance variable. At any given moment, I need to spawn a particular sprite from that family. Usually, I'd just loop through that family in order to find the sprite that has the correct name. However, I am unable to do that using the technique you mentioned. I'm assuming it is because those sprites do not exist on this particular layout sheet yet. Have you figured out a way around this problem?

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