R0J0hound's Forum Posts

  • one possible solution is by using qarp() to do the curve.

    Objects:

    A, B, dot

    Every tick

    —- destroy dot

    Repeat 10 times

    —- create dot at lerp(A.x, B.x, (loopindex+1)/11), qarp(A.y, (A.y+B.y)/2-abs(A.x-B.x)/4, B.y, (loopindex+1)/11)

    Dot.x > touch.x

    —- destroy dot

  • Changing the playback rate changes the pitch.

  • Isn't there a create by name action?

  • From what I read most browsers already do this internally with JavaScript. Are you having performance issues?

  • If it says the file isn’t compatible then it probably is corrupted unfortunately. If you open the file in a hex editor I’d guess it’s all zeros so there is nothing to recover.

  • You could always just move around the layout a screen at a time, capture a screenshot of each and merge then together.

    https://www.dropbox.com/s/rth2r0p44qex6 ... .capx?dl=1

  • Instead of using "set at (loopindex, 1)", use (array.width-1, 1). The first loop pushes stuff to the end and loopindex ends up being at the end of the array. In the second loop, loopindex is not the end of array. You could also use loopindex+TileFloor.count instead of loopindex in the second loop.

    You can offset the grid using this.

    grid_position = round((x-offset)/gridsize)*gridsize+offset

    For example when the walls are vertical.

    x = round((Mouse.X-24)/48)*48+24

    y = round((Mouse.Y)/48)*48

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If the object origin is at the center you can do warping with two events:

    sprite: x < -self.width/2

    --- sprite: set x to self.x+640+self.width

    sprite: x > 640+self.width/2

    --- sprite: set x to self.x-640-self.width

  • That dropbox change broke all the links, just TAG the authors in a reply and if they're around they can fix those links.

  • Use this equation for x and y. Solving for scrollx1 and scrolly1 should do it

    (X-scrollx0)/scale0 = (x-scrollx1)/scale1

  • So i had another pass at my event based pathfinding. It works by the user placing node sprites all over the map in whatever configuration, and then modifying the "pick neighbors" function to pick the connected nodes from any given node. So then you call "astar" with the start and end node uids, and the function returns a comma separated string of the node uids that make up the path. I also added some events to then move along that path, but there may be cleaner ways to handle that.

    Anyways here's it with thin walls.

    https://www.dropbox.com/s/jkxxfiguk1jak ... .capx?dl=1

    And you can also do different kinds of pathfinding by changing up the "pick neighbor" function.

    https://www.dropbox.com/s/zgh79wn62x7og ... .capx?dl=1

    https://www.dropbox.com/s/v4axhrz8stist ... .capx?dl=1

  • irina

    There is an image at every 360/sprite.count degrees on rotY. To rotate one at a time you could just change the value over time.

    Here's one way to change a value over one second from one value to another, but there are other ways.

    global number lerping=0

    global number t=0

    global number start=0

    global number end=0

    global number rot=0

    on click

    lerping=0

    --- set start to rot

    --- set end to rot+45

    --- set t to 0

    --- set lerping to 1

    lerping=1

    --- set t to min(0, t+dt)

    --- set rot to lerp(start, end, t)

    --- if t = 1

    ------ set lerping to 0

    Loading images at runtime would require a different plugin that lets a unique image be used per instance.

  • In psuedo events it should be this:

    On click

    --- set viewport size to (layoutwidth, layoutheight)

    --- wait 0 seconds

    --- snapshot canvas as png

    On snapshot

    --- browser: invoke download snapshoturl

    --- set viewport size to (640, 480)

    The wait is so the runtime has a chance to do the change, since it's delayed till the end of a tick.

    If it doesn't work, then i guess it doesn't work. I don't know if the scaling mode, the export method, or anything else has a bearing on it not working. I've had it work in the cases I've tested, but I don't recall what they were.

  • Why not

    X=int(mouse.x/64)*64

    Y=...

  • Here’s the latest one. There are other older ones.

    It’s not really a shame. It seems there is a lot of differing requirements for pathfinding that can’t be wrapped up in one plugin.