XGDragon's Forum Posts

  • Updated file link. Hopefully works now.

  • Why is this? Neither the text box or the button objects have these conditions available to them, makes me rather sad.

  • I always use 1600x1200 for everything, and then change the aspect based on the user and all that.

    I learned that practice from Blizzard, as they do that in Starcraft II.

  • Nevermind, I found the idiotic error I made!

  • They are global, but they're not really. Global is set to yes.

  • Why does either my dictionary or array become empty whenever I change layout? I add some data to an array/dictionary, action "go to layout2" and attempt to download this array/dictionary, and it downloads an empty .json

    Aren't these objects global?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Doesn't "Set animation" to <localvar & "walk"> work? It should.

  • Ah alright, great to hear! Hopefully we can see on it updates soon! Thanks for the 2D lighting, it's beautiful.

  • Calculate the angle the colliding object is coming from and force its movement upwards/leftwards etc based on that information.

  • Using Pode's sprite lighting effect, the same article continues on creating shadow effects. I was wondering why Pode didn't expand to this too, and more importantly, if its possible to get this code to work in C2? I tried it myself but all I got were either bugs or just no effect.

    From mattgreer.org/post/4dynamicLightingShadows

    ________________________________________________________________________

    #ifdef GL_ES

    precision highp float;

    #endif

    vec2 extrude(vec2 other, float angle, float length) {

    float x = length * cos(angle);

    float y = length * sin(angle);

    return vec2(other.x + x, other.y + y);

    }

    float getHeightAt(vec2 texCoord, float xyAngle, float distance,

        sampler2D heightMap) {

    vec2 newTexCoord = extrude(texCoord, xyAngle, distance);

    return texture2D(heightMap, newTexCoord).r;

    }

    float getTraceHeight(float height, float zAngle, float distance) {

    return distance * tan(zAngle) + height;

    }

    bool isInShadow(float xyAngle, float zAngle, sampler2D heightMap,

        vec2 texCoord, float step) {

    float distance;

    float height;

    float otherHeight;

    float traceHeight;

    height = texture2D(heightMap, texCoord).r;

    for(int i = 0; i < 100; ++i) {

        distance = step * float(i);

        otherHeight = getHeightAt(texCoord, xyAngle, distance, heightMap);

        if(otherHeight > height) {

          traceHeight = getTraceHeight(height, zAngle, distance);

          if(traceHeight <= otherHeight) {

            return true;

          }

        }

    }

    return false;

    }

    varying vec2 vTextureCoord;

    uniform sampler2D uHeightMap;

    uniform float uXYAngle;

    uniform float uZAngle;

    uniform int uMaxShadowSteps;

    uniform float uTexStep;

    void main(void) {

    float alpha = 0.0;

    if(isInShadow(uXYAngle, uZAngle, uHeightMap, uMaxShadowSteps,

         vTextureCoord, uTexStep)) {

        alpha = 0.5;

    }

    gl_FragColor = vec4(0, 0, 0, alpha);

    }

  • I'm not completely sure what you're on about, but you should look into using Pathfinder in conjunction with Moveto.

  • Use different normal map images for different angles?

  • The Algorithm object is a very simple plugin that allows one to easily create algorithms. Algorithms are essentially flowcharts.

    Apparently I need 3450987 reputation to post up links.

    DL: https://mega.nz/#!pbRkWRZT!1t-ysMhD8jdq ... ZbL4JE9Eao

    Manual: http://www.scirra.com/tutorials/480/algorithm-plugin

  • I don't see the option for this.

    It makes me sad. All sprites are the top animation on the list. You should be able to select.

  • I was suspecting that, but I couldn't quite confirm. Thanks!