Asmodean's Recent Forum Activity

  • What you describe are polar coordinates. That are an angle and a radius r.

    You can convert from polar to cartesian coordinates (the normal xy-coordinate system) with

    x= r * cos(angle)

    y= r * sin(angle)

    Then you have to add this to your x and y sprite position.

    your example r=10 angle=180°

    x = 100 * cos(180°) = 100 * -1 =-100

    y= 100 * sin(180°) = 100 *0 = 0

    add this to your sprite position xy an you have your new point.

    Look wiki for more Information

    https://en.wikipedia.org/wiki/Polar_coordinate_system

  • You could use the behavior-plugin from rexrainbow.

    http://c2rexplugins.weebly.com/rex_moveto.html

  • I made a little example. Is it that what you're looking for?

    drive.google.com/file/d/0B5FlDY8sggF4d0xHX2Z6eWRBYms/view?usp=sharing

  • I made something. Maybe is what you looking for:

    drive.google.com/file/d/0B5FlDY8sggF4b2x5N3g3ZEZjTDA/view?usp=sharing

    There are two 'characteristics' or 'special feature' in this capx.

    First I had to check a range of Y values. Normally it hat to be enough to check if Y-position of the enemy is equal to the Y-position of the player. But if the player is fast enough it will not trigger this event, because the player is faster then 1 pixel per tick and will not hit this exact value. So I had to check a range.

    Second don't use mirror to turn your enemy. If you do the angle of facing will always 0° you have to use 'set angle'

  • I don't know how do you control the speed of your sprite, but you can do it like that:

    make a Instance Variable for your player, something like speed.

    then events and actions:

    System every tick -> player move forward player.speed

    Touch on touched player -> player add 1 to speed

  • That was my failure. It should collide and teleport to the other line. Problem was that it teleport in the line not behind or before so without the variable to do it only one, the sprite jumps back and forth. With variable it looked like it would not collide and to make it worse the cloned line was thicker than the one from the new made sprite. So it only teleport in the line of the cloned sprite.

    So it was my failure.

  • You have to use a global variable to have access to a value from every layout.

  • That is because your two following events. The second event will immediately overwrite the result of the first event if the value is above 2.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Maybe because you only look for less than 2 or greater 2 not for equal 2.

    If your variable is 2 nothing will happen. Same for zero.

  • I've tried to make some kind of tunnel with two sprites as a barrier for entrance and exit of the tunnel.

    These sprites are cloned. Now if the collisions of both sprites are enabled it doesn't work. Only if I disable one of the cloned sprite collision events or use a completely new sprite as trigger point, it works. Why doesn't it work with cloned Sprites?

    Example: drive.google.com/file/d/0B5FlDY8sggF4SkJjTDlPSFE1Rkk/view?usp=sharing

  • Why don't you use a global variable or do I understand something wrong?

  • I don't get it to work either. It seems that calling "Set target Angle" after the tweening stops when the X is not in the range it makes the arrow snap if the X is again in distance.

    I get it to work without LiteTween if that will help you:

    I used "Rotate toward angel" and it works well.

Asmodean's avatar

Asmodean

Member since 31 Jul, 2015

Twitter
Asmodean has 9 followers

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

15/44
How to earn trophies