can you create a new object(type) at runtime?

This forum is currently in read-only mode.
From the Asset Store
Kids Game
$24.50 USD
50% off
New Sounds Added Update: 115 new sound effects added for no additional cost!
  • can you create a new object type at runtime?

    nothing fancy, let's say, a copy of "sprite", but name it "hello" instead of sprite, and now they can be referred to separately?

  • No, it could potentially make the runtime much more complicated, at the moment it is coded throughout to assume object types never change.

    What is the use of this anyway? Why might you need to do that? And how would you make events for an object that doesn't yet exist in the event sheet editor?

  • i suppose i dont really need it at all

    i was going to use python for the new objects

    i thought i had remembered someone creating a custom object creator at one point where you could specify names and such.

    its for an editor im making. itll still work just saving the object name, and then using those names to choose objects later. just one extra step. forget i asked.

    i am curious what that plugin i mentioned did though. it was back when iwas fairly new to construct, and afraid to try custom plugs

  • Were you thinking of this plugin, perhaps? It allows you to create a new instance of an object and give it a custom width, height, and/or angle in one event.

  • that was the one link, thanks

    i think way back when i first saw it, i misread the part where it said create object by name

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I gave a bone editor a whirl, and found that I couldn't just load images for bones because:

    a) I need to know the number of frames ahead of time

    b) I need to know the number of different bones ahead of time.

    My solution was creating canvases and pasting a "loader" sprite on them, which had a single frame loaded from the selected file.

    It worked, no animation support but for animation editing I guess it would do. Size was all wrong and stretchy though, I have to try it with the latest build.

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