[Plugin] Nickname, [Behavior] Nickname

From the Asset Store
The I18N (Translation) is a Construct plugin created to translate text in game.
  • how to you install this plugin

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • is there a way to create object by name withought the nickname behavior?

    foreach (var typeName in runtime.types)

    if(typeName == requestedType)

    create instance (runtime.types[typeName])

    this results an error for some reason

  • i think i found my answer:

    "This isn't supported because as part of minifying and obfuscating your project on export, object names are removed to make it even more difficult to reverse engineer a project.

    Allowing creating objects by a variable would then force C2 to include the original names of all objects, possibly making it easier to reverse engineer the project. TBH I think the best solution is a series of subevents like you've shown."

  • sagispin

    C3 supports creating instance by name string officially, without any 3rd party plugin.

  • rexrainbow

    im waiting for C3 to become more stable, and have more plugins.

    but untill then i will use the nickname behavior, i can enforce a nickname behav string to be the object name and avoid bugs, by running an exe that checks the xml files of the project.

  • Update

    rex_nickname plugin, rex_bnickname behavior: fix a possible bug in large project

  • Okay I'm trying to load an old project and it keeps telling me the behavior isn't installed. The website ONLY links to the 7z file for the plugin itself, and I cannot find a link for the behavior alone. Please help me! I need to get to this old project to grab some code!

    EDIT: sorry, I just didn't notice the bnickname part but I found and got it working.

  • Hi rexrainbow,

    thx for these plugins. Is there any way to inlude a "change animation" action in the rex_uid2prop plugin? I'm mass-spawning isometric sprites from a stored json-array with the nickname plugin, and the sprites can have four different rotation-animations. Right now I do a workaround by setting their opacity to certain levels and change the animation later based on their opacity value.

    Btw. I would donate some money if that could help :)

  • Cavaron

    open edittime.js

    add

    AddNumberParam("UID", "Instance UID.", 0);
    AddStringParam("Animation Name", "Animation Name");
    AddAction(21, 0, "Change animation", "Animation", "Instance UID <b>{0}</b>: set animation {1} ", "Change animation", "InstSetAnim");
    
    

    open runtime.js

    add

    Acts.prototype.InstSetAnim = function (v,a)
    {
    	var inst = this.runtime.getObjectByUID(v);
    	if (!inst)
    		return;
    	if (a != "")
    		cr.plugins_.Sprite.prototype.acts.SetAnim.apply(inst, [a, 1]);
    };
    

    and save it.

  • Thx Eren, you saved me a lot of work!

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