newt's Forum Posts

  • Yeah the extra conditions/triggers are needed to pick the instance the timer belongs to.

  • rexrainbow

    Yes it does, but it has only one trigger.

    Whats needed is, on start, on end of wait, and on end as well.

    Much like the Ease Tween behavior.

  • We have a few behaviors that handle time, Ease Tween, Event List, and Duration.

    What would be nice is the ability to create a named timer at run time so that you could have several different actions at any given time.

    Event list, and Duration are set up to do this, however, they lack triggers for picking individual instances, such as on "this named timer" start, or "that named timer" end of wait, and "foo named timer" end.

    All of that can be accomplished using Ease Tween, and a Boolean comparison, but that complicates things quite a bit..

    Any takers, thoughts?

  • Sounds like you need to put in a request to have some primitives, other than box in the editor.

    The question is what other primitives would be useful while not taxing the system too much.

    Ashley might say that an octagon would be too much, where something like an iso square would be about the same.

  • I always thought lerp returns a value, not changing a value. I thought it takes A and B, and uses C to pick a spot between the two. Going from 0(A) to 1(B). So if I set lerp(0,100,5*dt) to run every tick, why wouldn't it work? I', sorry if I'm not getting it. If you don't want to explain it anymore, no worries. :)

    I think you're confused about what dt does.

    Dt is the time since the last tick, and will stay the same as long as the frame rate is constant.

    Also you might take a look at the fade behavior.

    Also comparing the last value as a component of time isn't exactly correct, in that it only effects time because of the amount that it adds each tick, IE 5*dt would add less than 20*dt.

  • Because its getting its current opacity, which you change to a percentage of 100 every 5*dt seconds.

    Basically its like saying add n amount to the total every tick, until it gets to 100.

    Self.opacity is the only thing that changes.

    lerp(0,100,5*dt) will always return the same value, just like lerp(0,100,0.5) will always give you 50.

  • Object is just pseudocode I used for the object name. Feel free to use .self if you like.

  • lerp goes off of a percent from 0 to 1, so anything over 1 would be over 100 percent. lerp(0,100,0.5) would give you 50.

    Also using self.opacity as the target doesn't really work here. The only thing that changes in lerp(self.opacity, 100, 5*dt) is the first argument, because the third argument is used as a percent of time, rather than a percent of the target value.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • try lerp(object.opacity,100,5*dt)

  • Might try overlap at offset.

  • The reason we don't have a circle is because, well there's no such thing as a circle. It's either a bunch of points, which is highly unrecommended, or you use pythag IE distance(), which is not a great idea because it does not pick on its own.

    I would suggest thinking less circle, and more poly, as in hexagon, or perhaps octagon.

  • There's a modified version that can do box collisions:

    http://www.scirra.com/forum/plugin-canvas_topic46006_post325341.html#325341

    Otherwise a dummy sprite should be fairly suitable.

  • If its just an 8x8 pixel image then the Canvas object should be able to handle it all by itself as it is an array all on its own.

    Just remember it uses relative coordinates, and to get a specific color use rgbaAt(x,y).

  • Oid is based on the Object type, while uid is based on the Unique instance.

    You should probably stay away from both, unless you're storing uid in variables.

  • Interesting, didn't know z order affected it.

    Yeah as R0J0hound suggested instance variables are the way to go.

    The only other thing you can rely on is the iid, and the order of creation, but just like uid, that can change when you destroy an instance.