Create Object By Name

0 favourites
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • ...Please?

    I know that Construct 2 changes the names of objects on export to make it harder to reverse engineer the game and everything, but could it be optional? Like, a box you check at export?

    I know about the workarounds but they are not always simple or even possible, and I've read many people who'd really like to have the "Create object by name" action back (since it was in Construct Classic).

    + 1 if you want it ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ...Please?

    I know that Construct 2 changes the names of objects on export to make it harder to reverse engineer the game and everything, but could it be optional? Like, a box you check at export?

    I know about the workarounds but they are not always simple or even possible, and I've read many people who'd really like to have the "Create object by name" action back (since it was in Construct Classic).

    + 1 if you want it ?

    +1, this can be necessary for arcade games... but I still prefer to use one instance and use different animation/variables

    anyway, in my opinion create object should stay by default with choose by name, because you have just to write the name of the object

  • It is not implemented because of the code obfuscation. I think objects get called internally only by there id and the name exists only in the editor for making development more easy.

  • Yes, that's what Ashley said. Still, if this could be changed at least optionaly, it'd be terribly great.

  • Try this plugin

  • There is a plugin that let's you do this. Check that section if you need it. I cant see this being in official support ever. And in the long run hopefully there will overall better ways to create and manage objects.

  • I didn't remember this nickname plugin by Rex. But sill, you need an event for every object to give it a nickame, so it doesn't make a big difference from having an event for every object to be created. :-/

    (Plus you can't give a different nickname to every object in a family differently using the "Assign nickname" action onto that family, even in a "for each" loop : it'll assign a nickname to the whole family instead)

    No offense intended towards rexrainbow.

  • Kan

    You might assign the name in property table in rex_nickname behavior. It does not need any actions.

  • rexrainbow

    Thanks for your efforts (and for your many plugins, some of which I had already downloaded and will definitely use in the future ). I just tried it but I still can't figure to make it work the way I need it to. Here's an example of what I'm trying to achieve :

  • Kan

    It works fine. I change "tap" to "touch start".

  • Really? It keeps not working on my side. When using "tap", a random object is created, not the one that I want. And using "on any touch start", nothing happens at all. Did you check my capx?

  • Kan

    I got it, it need to click many times.

    Okey, Here is the fixed version.

    I set the name on nickname behavior directly without any event. The origin problem is, the name had been assigned to family type, not the object type.

  • rexrainbow

    Thank you for taking it the time to show me. This plugin might save me a lot of events in future games. (by the way it also works with "on tap")

    One last thing, I take it as there is no way to assign a nickname to an object at runtime, then create the object? The nickname must be manually assigned by the game's creator and can't be assigned from a variable or from code while the game is playing, or the "create instance" action will not work?

  • Kan

    The "Action:Assign nickname" in rex_nickname plugin is used to set name of an object (not a family) at runtime.

  • Alright, I'll keep that in mind. Thanks rexrainbow for this great plugin and behaviour and for the help.

    And if ever you have time to implement assigning nickname to families, that'd be even greater.

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