blackhornet's Recent Forum Activity

  • Thank you! I was able to optimize the self-call to:

    pluginProto.acts.PlayByName.apply(this, []);

  • How do I call an Action from either another action, or an external function?

    Say I have Action:

    Acts.prototype.PlayByName = function (folder, filename, looping, vol, tag)

    {}

    How do I call it from:

    Acts.prototype.PlayByNameEx = function (folder, filename, looping, vol, tag)

    {

    }

    or

    function SomeFnc()

    {

    }

    Thanks.

  • The frames start counting at 0, so checking the Sprite.AnimationFrame value will give you the actual value also, assuming your frames are in order.

  • You probably aren't clicking far enough to the left on your event to get the Add/Else menu. You are clicking on the condition.

  • Your X sprite has two frames, which are running as an animation. Delete the check-mark.

  • You must have uploaded the wrong game. This is a speed test.

  • Looks like your animation is larger than the PlayerBox, so the positioning is off. I bet if you make the PlayerBox visible, it will become self evident what the problem is.

  • Actually, I've had another look and there's a number of issues here. Lerp isn't the biggest one. Lerp really wants to go from low to high, not high to low, so you need to invert the math, which is why you have to subtract the lerp value from the original. The manual gives the math for lerp. You can try it manually.

    The real issue is Wait! Wait seems to cause more trouble than it does good. If I disable all of the waits, things work again. You have to remember that a true condition runs every tick. So for example, slajd=1 was running many times, calling Wait every time, so there are a lot of waits stacked up by the time you press the second button, which means all of those lerps moving the opacity up where still there, fighting with the slajd=2 code which is trying to move it down. That's why everything was jiggling back and forth.

    You need to change your code to use timers, which there are many threads on, to get the timed behaviour you are looking for. Here's the changes with all waits turned off for the moment, and the cytometriaprzeplywowa lerp altered. You can see it fades slowly, where all the unchanged ones disappear almost immediately.

    Also you should make sure your variables get set to zero along the way. For example, slajd=1 stays running that code forever, until you press some other button. Same for wybrany.

    sample (change the ZIP to CAPX).

  • lerp(a,b,c)

    lerp(100,0,.9)

    a - lerp(a,b,c)

    100 - lerp(100,0,.9)

  • Change your lerp(a,b,c) to a-lerp(a,b,c). If you do the math you'll see the pattern. I'm heading out the door at the moment, or I'd spend more time explaining - sorry.

  • You are clicking on the condition. Move left past the cog icon and you'll see "Add" at the top, and "Add sub-event" there. If you watch your video closely you do actually see "Add" a couple of times - you are just too quick.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • How about something along the lines of:

    <img src="http://blackhornettechnologies.com/Construct2Stuff/non90.png" border="0" />

blackhornet's avatar

blackhornet

Early Adopter

Member since 28 May, 2012

Twitter
blackhornet has 26 followers

Connect with blackhornet