zatyka's Recent Forum Activity

  • TELLES0808

    No problem. I would have added your user name to my last post, but for some reason I thought you were looking for a solution for polygons and not lines. Anyway, I hope my demo helped.

  • Biino

    Windwalker

    It's not terribly difficult to find the intersection point of 2 lines:

    You can use each "line" object's angle and position to determine its straight-line equation. From there, use the two equations to solve for the same x and y.

    Demo

    Capx

    This method will only work for straight lines. Unfortunately finding the intersection point of polygons is a bit outside my mathematical comfort zone... at least for now. It would be handy if there was a system expression for LastCollisionX and LastCollisionY. I don't know how difficult it would be to implement, but I do know it's a lot easier to detect if polygons collide rather than where.

    You'd be surprised how often math is used in creating games. Knowing basic algebra, trig, and geometry has helped me on several occasions. If you're interested in brushing up on the subject, there's a myriad of resources online.

  • Ah, understood regarding the 2nd issue. You'd probably be better off regenerating the obstacle map whenever it changes instead of right before finding a path.

    <img src="http://i.imgur.com/W1ikCg9.png" border="0" />

    Granted, it's more labor intensive due to the frequent recalculations, but it's probably the best solution at the moment. Now that I understand the situation, I agree that it would be handy to have the "On Obstacle Map Regenerate Finished"

  • 1. There are expressions to find the coordinates of nodes for an object's path. You can loop through each node, and save them to an array. Keep in mind, you'd only need to save them to an array if you want to save the path for some other purpose.

    Here's an example of using the bullet behavior to replace the "move along path" action. The capx actually has 2 examples. One is moving an object along its own path. The other is saving an object's path to an array, and then moving along the coordinates stored in the array. The second option would be handy to use when you want more than one object to follow the same path.

    Demo

    Capx

    2. I still don't think I'm following. I'm not sure what the difference between a trigger for "recalculating done", and a trigger of "on path found" is. If you're still having an issue, could you post a capx demonstrating the issue.

  • I can't speak to what program would be best to animate the bars.

    As far as displaying the animations in C2, I agree with newt that it gets tricky without an option to animate tiled background. You could create different tiled backgrounds for each frame, and create your own animation system using events, but that solution is pretty ugly. Another option would be to do something like this:

    Demo

    Capx

    I'm using a sprite for the bar's animations, and a masking sprite on top of it. Changing the width of the masking sprite makes it appear as if the animated bar is growing. It's also kind of ugly, but it may work for you.

  • Whiteclaws

    Sorry about that. Set ChangeY to the Y element you need to shift.

    To shift the Y element left:

    <img src="http://i.imgur.com/pXh66Z3.png" border="0" />

    To shift the Y element right:

    <img src="http://i.imgur.com/F5F23RC.png" border="0" />

  • Example Capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • (A)(B)( )( )

    (B)( )( )(A)

    <img src="http://i.imgur.com/IX77ueZ.png" border="0" />

  • All you should need to do is load the images as project files, and then call them using the Load image from URL action.

    Project Files

  • I'll look up a tutorial on how to use loops now.

    Just to be clear, the specific loop I referred to in my previous post is a "For Each Element" loop condition within an Array, though knowing how to use all types of loops can be incredibly useful.

  • If I'm understanding you correctly, you can save the images as project files, and load them via the "Load from URL" action.

    Using project files in Construct 2

  • I need the most compact way to move an array row to the left ... like this ...

    [ ][ ][N][N]

    [ ][N][N][ ]

    You could push a new element X element on the front of the array. If that's not appropriate, you could move all the XY values to a temporary array, and then cycle through the temporary array to reassign each X,Y to the original arrays X+1,Y.

    It also needs to switch from one side to another like this ...

    [N][N][ ][ ]

    [N][ ][ ][N]

    I'm not sure what is being switched in this example.

zatyka's avatar

zatyka

Member since 11 Aug, 2012

Twitter
zatyka has 1 followers

Trophy Case

  • 12-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • x11
    Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual

Progress

15/44
How to earn trophies