Maths Help Please

0 favourites
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Here's the LayerToCanvas/CanvasToLayer approach if you want to see that.

  • MultipleChoice

    Please see this movie for what my actual problem is: http://d.pr/v/1b0eN/4oqF4TZm

  • Here's the LayerToCanvas/CanvasToLayer approach if you want to see that.

    you, my friend are royalty among humans. thank you so much for the help this is exactly what I needed!!!!!

  • : S**t, you are right, it does break, when you rotate

    I am not sure, but did you realize, when you rotate your layer, the movement also get confused... You will have several problems.

    I am quite sure, you can solve the rotation different also.

  • Here's the LayerToCanvas/CanvasToLayer approach if you want to see that.

    Awesomely short. Did not know this CanvasToLayer stuff either. Thanks.

  • As a way to give back and as a thanks for everyone's help, here's my full enemy indicator code, using multiple enemies in a family marked as 'EdgeTrack' so anything you want tracked, just add it to that family and it should show indicators.

    Features:

    • Tracks multiple instances
    • Indicators Fade out when associated enemies enter the screen
    • Indicators Fade back in when enemies leave the screen.
    • When enemies enter the screen, indicators change to a flashing 'warning' version.
    • Indicators created automatically when a new instance is created
    • Indicators destroyed automatically when its parent enemy is destroyed.

    Hope this helps someone, thank you so much for your help, especially ramones who did that final canvas/layer conversion for me.

  • small bug in the create/destroy stuff but easy to fix. you'll see it if you just read it line by line.

  • : Thanks!

    It would be nice to make a version, where the arrow is really at the right position in their right angle. Since both our solutions are a bit off, due just offsetting it in horizontally or vertically rather than radially. (Causing the arrow mostly being off the line between player and target.) Just to make things perfect

    I might take a look, to figure it out. ramones maybe you got an idea?

  • > : Thanks!

    It would be nice to make a version, where the arrow is really at the right position in their right angle. Since both our solutions are a bit off, due just offsetting it in horizontally or vertically rather than radially. (Causing the arrow mostly being off the line between player and target.) Just to make things perfect

    I might take a look, to figure it out. ramones maybe you got an idea?

    Hey man, it's funny because that's actually perfect for me - im not really looking for the position according to the player, im looking for the position towards the edge of the screen.. where maybe in a GTA type situation, you would want the position to the player, this is actually for enemies 'entering the screen' so i actually want to know their exact position they will be entering. In my actual game, the angle itself of the indicator is irrelevant because the angle will always simply be pointing to the edge either up down left or right.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • : I understand, but that does not change the fact even in your case, that the arrow angle and position don't exactly correlate diagonally with your Player/Target "line of sight". It still would look smother if it did. Sure, it's good enough, but it would be challenge to solve that "problem".

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