[Behavior] Step

0 favourites
  • rexrainbow - sorry rexrainbow, this still doesnt seem to work. With the new example you posted, no sprites are created when dragging the blue box.

  • rexrainbow , what justifun said. Perhaps it's something related with c2 version? I'm using 186.2 beta right now.

  • I was trying it with 187

  • Try Construct 3

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

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

    eli0s

    I had updated capx again. Sorry there had a bug in previous version -

    Stepping mode = Linear , using Condition:On step

    otherwise , using Condition:On horizontal step, Condition:On vertical step.

    I still need to maintain it more clearly.

  • rexrainbow , you don't have to apologize, you are doing us a favor here

    I'm not sure what results I should get from this behavior, I saw your Laser effect example but I'm still uncertain.

    I find that there is little difference when "Pixels per step" is 10 or 100 and no difference at all when the values are 100 or 1000000. Only on very small values I can notice a clear difference: 1 will produce a smooth line (excellent for trails by he way!) while 5 will give a dotted line. On higher values, only on very fast movements there are big gaps between the dots and the distance seems to be loosely linked with the speed of the movement. The actual value of the "Pixels per step" parameter however doesn't seem to be reflected on those gaps. Meaning that a 100000 value doesn't produce a 100000 pixel gap or something similar to that.

    Furthermore, other than linear "Steeping mode" no other setting works and with in the conditions, the "On horizontal step" and "On vertical step" doesn't work either.

    I've attached a screen capture that shows some of the above. Does these results look as expected?

  • Perhaps i'm miss understanding on how its supposed to work.

    I believe the idea is that if you were making a top down rpg game for example, and you wanted to leave foot prints behind your character as they walked, that it would stamp a foot print sprite every "pixels per step" behind you.

    Or if you were going to make a game where you dragged your finger to create a line path behind it, it would leave a trail of dots spaced evenly as you moved.

    Similarly to as if you were to manually code it like this.

    Variable StartX

    Variable StartY

    Variable (pixels per step)

    While in Touch

    If Distance (startX,StartY, TouchX, Touch.Y) > (pixels per step)

    create sprite (trail)

    angle (trail towards touch.x, touch.y)

    set startX, to Touch.X

    set startY to , Touch.Y

    Or was it originally designed to do something else?

    Thanks for your help rexrainbow. We love all of your amazing plugins!

  • eli0s

    justifun

    Yes, it is designed for foot prints, like this demo. So basically, "Pixels per step" will be set to a small value.

    Actually, this behavior is cut from official custom behavior, since this feature is very small and could be used standalone. I think that custom behavior could use it to check overlap at each insert point.

    Another usage is to insert points to do something like the laser demo. (I would like to redo another one, later.) The noise will add a random shift to each insert point.

  • rexrainbow , i would imagine each step supposed to be the same distance apart regardless of how fast the object creating it is moving?

  • justifun

    Yes, it inserts points by "Pixels per step" from previous position to current position.

    I am still thinking which feature should be added into this feature, for foot prints only.

    Maybe I should not use object.X, object.Y to get points, since I do need to check collision.

  • Is there no way to only have 2 pixels show every x seconds ? I have a character with a fast speed and all this seems to do is create a giant snake-like line which does in no way look like footsteps Changing the settings "pixel per step" has zero effect on anything..

    I even tried destroying the object after 0.001 seconds and it still just creates a snake-like line and than destroys it.

  • No, step behavior is not designed for this purpose.

  • I think meant something like this? (i dont know why scirra hasnt its own uploader )

    mediafire.com/?8939mor17qhojgs

    At first i've made it with rex's steps. But then i realized you could do footprints with the simple 8-movement behavior.

  • rexrainbow hi can you please reupload the Step Behavior, actual link is down. Thanks in advance

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)