sagispin's Recent Forum Activity

  • sagispin

    "Condition: For each key" of behavior JSON won't pick instance (sprite), therefore Each "Expression: Sprite.JSON.CurValue" will point to first sprite. You could print expression: Sprite.UID to see the picked instance of expression.

    Add "system.forEach(obj)" is solution indeed.

    i manged to fix it - my style -> editing the add on:

        Cnds.prototype.ForEachItem = function (key) {
            // === NEW ===
            var sol = this.type.objtype.getCurrentSol();
            sol.select_all = false;
            cr.clearArray(sol.instances);
            sol.instances[0] = this.inst;
            // ===========
    
            var entry = this.getEntry(key);
            var current_frame = this.runtime.getCurrentEventStack();
            var current_event = current_frame.current_event;
            var solModifierAfterCnds = current_frame.isModifierAfterCnds();
    
            var key, value;
            this.exp_Loopindex = -1;
            for (key in entry) {
                if (solModifierAfterCnds)
                    this.runtime.pushCopySol(current_event.solModifiers);
    
                this.exp_CurKey = key;
                this.exp_CurValue = entry[key];
                this.exp_Loopindex++;
                current_event.retrigger();
    
                if (solModifierAfterCnds)
                    this.runtime.popSol(current_event.solModifiers);
    
            }
            this.exp_CurKey = "";
            this.exp_CurValue = 0;
            
            // === NEW ===
            sol.select_all = false;
            cr.clearArray(sol.instances);
            // ===========
    
            return false;
        };
    [/code:3n27vui3]
    
    took my around 2 hours
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • im trying to change this part of the code, to make it go for each instance

    any ideas?

     Cnds.prototype.ForEachItem = function (key) {
            var entry = this.getEntry(key);
    
            var current_frame = this.runtime.getCurrentEventStack();
            var current_event = current_frame.current_event;
            var solModifierAfterCnds = current_frame.isModifierAfterCnds();
    
            var key, value;
            this.exp_Loopindex = -1;
            for (key in entry) {
                if (solModifierAfterCnds)
                    this.runtime.pushCopySol(current_event.solModifiers);
    
                this.exp_CurKey = key;
                this.exp_CurValue = entry[key];
                this.exp_Loopindex++;
                current_event.retrigger();
    
                if (solModifierAfterCnds)
                    this.runtime.popSol(current_event.solModifiers);
            }
    
            this.exp_CurKey = "";
            this.exp_CurValue = 0;
            return false;
        };
    [/code:1q7zkkqn]
  • hello rex,

    in the behavior verson of the add on.

    if you have multiple instances of an object, the "for each" condition does not iterate over them correctly.

    it can be fixed by writing "system.forEach(obj)"

    here is a simple example:

    https://ibb.co/j0jmVv

    Visual Familiy

    family that may contain - sprie, sprite font, particles, scml or any visual plugin

    i have the issue where i have to create multiple familys that look the same for each plugin.

    like a family that has the pin behaviors - to controll all the pinned object in my game - currently i got to have spritePinFam, spriteFontPinFam etc...

    i written more here

    but nobody commented *sad face*

  • i want log the name of a beavior

    "sine" "sine2" within the sdk

    is there an expression to do so?

  • can we all agree that 'active on start' default value should be NO?

  • You need the Media Feature Pack for Windows 10.

    https://www.microsoft.com/en-us/downloa ... x?id=48231

    Thanks for the help but it sais "not comptaible"

    i tried instead

    Media Feature Pack for N and KN versions of Windows 10

    https://www.microsoft.com/en-us/downloa ... x?id=49919

    but its still not working

  • We haven't changed the encoder for a long, long time so even if you downgrade I assume it will work identically. Did you get Windows 8 N or one of the variants without media features? If so, it'll be missing the ability to encode AAC. You'll have to find your own encoder in that case, encode the .wavs yourself, then just import the .m4a files in to Construct 2.

    i have windows 10 Pro N and im getting this errors when importing a wav file:

    w7aacenc.exe - System error MFPlat.DLL was not found

    w7aacenc.exe - System error MF.DLL was not found

    converted to OGG, bug failed to convert to AAC.

    i have to use external converters to fix the issue?

  • wait, so which pin behavior is the best!?

    rex or prominent

  • check out this plugin

  • Another suggestion: Why not implement all the Touch plugin coordinate translation functions ( X("layer"), Y("layer"), XAt(layer index) and YAt(layer index) ) to every plugin wich uses coordinates? It's pretty handy, and specially so SIMPLE!

    Right now, Im using an action on a Construct 2 project that obtains the equivalent coordinates of a sprite on another layer (with different parallax, scaling and all that, so I need to translate coordinates) and it goes like this:

    CanvasToLayerX("Layer1",LayerToCanvasX("Layer2", sprite.x, sprite.y) ,LayerToCanvasY("Layer2", sprite.x, sprite.y))

    (Same thing for Y)

    While it could be so much more elegant and ABSURDLY EASIER with:

    sprite.X("Layer1")

    I bet anybody who ever had the need to set up something like that did struggle with it at least a little (I sure did!)

    that would be awesome to have

  • "Visual plugins (e.g. Sprite) appear in the layout and draw something to the screen.

    Hidden plugins (e.g. Array) are placed in a particular layout, but do not draw anything to the screen.

    Project-wide plugins (e.g. Mouse, Audio) are added to the entire project, and can only be added once."

    https://www.scirra.com/manual/69/plugins

    the problem:

    if for example i want to have a family with just the pin behavior, i cannot place there a sprite font, a sprite and a spriter object.

    but i can add a pin behavior for each of this objects individually.

    i suggest another type of family that is not plugin based, it will lose the plugins, actions and conditions.

    but it would share the behaviors / instance variable / effects.

    you start by creating your family and adding sprites as usual ,if you then try to add a sprite font to the mix a warning will appear.

    it will state that it will lose its sprite actions and conditions (delete them from the event sheets).

    and will only keep its family behaviors / instance variable / effects and transform properties (if its a visual plugin).

    you cannot place 2 objects from different plugin-type (Visual|Hidden|Project-wide) in family

    its probably a lot to ask, but im sure heavy users will love to have this

sagispin's avatar

sagispin

Member since 29 Dec, 2015

None one is following sagispin yet!

Trophy Case

  • 8-Year Club

Progress

8/44
How to earn trophies