R0J0hound's Recent Forum Activity

  • That latest cap gives an error when opening.

    "An invalid object in a condition was referenced"

    I don't have time currently to dive into the cap file and find where the issue is. Basically it would involve opening the cap in python with capreader, going to where the object types are listed to get all the oids, then going through the event section and verifying the oid of every event is in the list.

    I've never enjoyed the python error reporting in CC, it's kind of broken since it only gives an error and doesn't say where it happens. The most immediate idea that comes to mind is since python is case sensitive you might get errors like that if the capitalization isn't the same.

  • I didn't look at your capx, but here's on possibility:

    Basically the first step is do a laser. Here used a sprite that is stretched from the gun to the wall. Then a new laser is created at the end and it's angle is set to the reflecting angle. In the link the direction is stored as a x difference and a y difference, then to bounce against a vertical wall the dx is negated. In a similar way horizontal walls are handled. The actual angle can be calculated with the angle expression.

  • Yttermayn

    The gist of it is it allows you to draw stuff. There is no documentation other than when adding actions and such there are little descriptions. Overall most of it is self explanatory imo, and it's simple enough to test things to see what they do.

  • Well, there is no plugin for it, and I'd do it all with events. The main difference is it would allow the ball to rotate in all directions like a real pool ball would, so you could get motion near exactly like real pool balls. It would just be the motion, to make the ball look like it's rotating that way is another thing entirely. Look at the wikipedia page about impulse to see some of the math involved.

  • bloodshot

    You can do that with the "set velocity" action, select polar and the first value will be angle of motion and the second speed.

  • it's basically a perspective transform, but it can be tricky to get it to match an effect by just tweaking. For the mode7 effect there's a capx that has the math worked out but it's not too pretty.

    A approximation would be to take a snapshot of just the ground with the effect applied. Measure the width in the middle and at the top. Then taking an object's y position you can calculate the scale with:

    Scale=lerp(widthtop/widthmid, 1, y/240)

    Or instead of 240, half the screen height.

  • neoneper

    I guess I don't understand what you're going for exactly.

    In that example there are two layers. One is a top view, and the other takes the top view positions and treats them as isometric positions.

    What I gathered from your question you wanted to be able to click on the isometric view and have that position converted to the map view. I that's the case then the equations I gave should do it.

    On mouse click

    --- player find path to 0.5*mouse.x+Mouse.y-400, -0.5*mouse.x+Mouse.y-80

  • That's pretty much how you'd do it using the physics behavior. Set gravity to 0 and use linear damping to slow the balls down over time. One complaint I've seen is the collisions can be spongy at times. You can improve that by setting the iterations up higher in the physics settings.

    You could use the bullet behavior instead but multiple balls bouncing off each other won't be handled well.

    A third way would be to do to custom made physics. This is the very advanced approach, but can yield more precise physics. The ultimate would be to impliment 3D physics for the balls.

  • I guess one way would be to place a sprite down for every note and play each one as another sprite moves over them.

    you could even use one sound and change the frequencies.

    Here's my experiment on the matter:

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

    you could do it in a more programmy way using an array too i suppose.

  • There's nothing to it. Any capx would work. What you see is the viewport.

  • neoneper

    The plugin has expressions for isometric to layout position, but I guess it would be good to have conversions going the other way. For now here's the equations to do it:

    For a layout position x,y, you can find the isometric position ix, iy with this:

    ix = 0.5*x+y+iz-400

    iy = -0.5*x+y+iz-80

    You need to specify an isometric z: iz

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I guess you would have to count it manually. I can't really think of a use for being able to know the number of animations when your game is running.