R0J0hound's Recent Forum Activity

  • Your posted capx is broken (The layout files are missing). I grabbed the art though and made an example of grabbing and throwing.

    https://dl.dropboxusercontent.com/u/542 ... throw.capx

    Space is used to grab and once an enemy is grabbed Space+Left or right will throw.

    After adding the sine behavior to the enemies I'm amazed by how enjoyable it is to throw the enemies off the screen.

  • Something like this should do it:

    global number speed=0

    every tick

    --- set speed to distance(0,0,Sprite.Physics.VelocityX,Sprite.Physics.VelocityY)

    System: variable speed > 90

    ---- Sprite: Physics: set velocity to Sprite.Physics.VelocityX/speed*90, Sprite.Physics.VelocityY/speed*90

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Alpro

    It can be done by modifying the capx with the info from my last post, or you could setup a function to do a Quadratic Bezier Curve, which is like lerp but you can do this:

    http://en.wikipedia.org/wiki/B%C3%A9zie ... tic_curves

    and here's the math for it:

    http://en.wikipedia.org/wiki/B%C3%A9zie ... ier_curves

    The math doesn't look much simpler:

    https://dl.dropboxusercontent.com/u/542 ... /qarp.capx

    You can change up the path by changing xmid and ymid to another location.

  • Using this:

    function dir(object)
    {
        methods = [];
        for (z in object) {
            methods.push(z);
        }
        return methods.join(', ');
    }[/code:1bptsq29]
    I was able to see all the members of cr, instance and renderer.
    
    cr.
    plugins_, behaviors, logexport, seal, freeze, is_undefined, is_number, is_string, isPOT, nextHighestPowerOfTwo, abs, max, min, PI, round, floor, ceil, vector2, segments_intersect, rect, quad, RGB, GetRValue, GetGValue, GetBValue, shallowCopy, arrayRemove, shallowAssignArray, appendArray, arrayFindRemove, clamp, to_radians, to_degrees, clamp_angle_degrees, clamp_angle, to_clamped_degrees, to_clamped_radians, angleTo, angleDiff, angleRotate, angleClockwise, rotatePtAround, distanceTo, xor, lerp, unlerp, anglelerp, qarp, cubic, cosp, hasAnyOwnProperty, wipe, performance_now, ObjectSet, KahanAdder, regexp_escape, CollisionPoly, SparseGrid, GridCell, effectToCompositeOp, setGLBlend, round6dp, equals_nocase, Property, Parameter, Condition, Action, Expression, FontInfo, ParseFontString
    
    instance.
    SetPosition, SetSize, GetSize, GetLayoutSize, SetHotspot, GetBoundingRect, GetBoundingQuad, EditTexture, GetTexture, GetOpacity, GetAngle, DrawTilemap
    
    renderer.
    Quad, Line, Line3D, Fill, Outline, CreateFont, ReleaseFont, LoadTexture, SetTexture, ReleaseTexture, EnableTiling, SupportsFullSmoothEdges
    
    A.
    1. Not that I could find.  Possibly there may be another global namespace, but since there isn't any plugins that use such a  thing it probably doesn't exist.
    
    2. Looks like there's a setPosition() but no getPosition(), so I guess averaging the corners it the only way currently.  There is a getAngle() though.
    
    3. See list above, other than that the following js files are used at edittime:
    common_prelude.js
    edittime_prelude.js
    
    Other than that you possibly could open C2 in a hex editor and find a list of js names, but I don't imagine you'd find many more.
  • You could use the "System:pick by comparison" condition with the distance() equation and an enemy "range" instance variable.

    Ex.

    System: pick Enemy by comparison distance(enemy.X, enemy.Y, player.X, player.Y) < enemy.range

    --- enemy stop

  • Instead of "Global" how about we call it "Card" since that is more descriptive and less confusing since global already has uses in C2.

    And just to restate the problem: you want to know when three of the cards have those 3 different animation frames.

    Do to picking we can't just have multiple "compare animation frame" conditions in one event and have it work like we want. We can make make a function to do this though as it doesn't affect picking.

    So you could do something like this:

    On function "hasCard"

    Card animation frame = Function.Param(0)

    --- set return to 1

    System compare: Function.Call("hasCard",3) & Function.Call("hasCard",5) & Function.Call("hasCard",7) =1

    --- Do something

  • Maybe instead of using anglelerp in multiple events, just use it once in an every tick event with anglelerp(bar.angle, weightRight-weightLeft, dt)

    And just make sure to add the weight's weight every time you pin it and subtract it every time you unpin. It looks like you got it mostly there but instead of checking for an overlap of groupBase in event 9, you rather need to check for an overlap of baseCheckL and baseCheckR individually in events 10 and 11 so you subtract the weight from the correct side.

  • There isn't enough info here.

    What steps did you do to see this bug? Do you have a minimal capx that reproduces the error?

  • The .scale expression was asked for before and the main problem was what value should be returned if the object was not uniformly resized? You could just use a instance variable instead though.

  • Make a post in the bug forums. Just using the physics behavior should not cause a javascript error.

  • You could normalize the angle to a range of (-180,180) with angle(0,0,cos(a),sin(a)) before comparison.

    Or you could use the sprite condition "is within angle" or "is between angles".

    Or you could use the anglediff(a,b) expression to find the angle difference in the range of (0,180).

  • digitalsoapbox

    I can't reproduce the issue. It's working fine here in Firefox, Chrome and NodeWebkit. Can you post a capx with the issue?

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 157 followers

Connect with R0J0hound