Turret Rotation?

0 favourites
  • 3 posts
  • I have tank game in C2, the player tank mechanic works great,

    but my enemy tanks (only using one tank right now, add more when i get logic and code working) uses the turret behavior.

    current code:

    start of layout: add turret target (player)

    every tick: EnemyTurret set position to (EnemyTank) (image point 0)

    EnemyTurret turret has target: EnemyTurret setangle toward (Player.X, Player.Y)

    Turret Behavior:

    Range: 200

    Rate of fire: 2.5

    rotate: yes

    rotate speed: 180

    target mode: nearest

    predictive aim: no

    projectile speed: 200

    initial state: enabled

    use collision cells: yes

    when i run the layout the EnemyTurret is facing 90 degrees to the left away from my Player,

    have tried everything and can't seem to get it to face me.

    EnemyTurret is not even spawning objects or anything??

    please help!!!!!!!!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Are you using artwork for the turret? Possibly the artwork isn't facing the same way as the turret object so it simply looks like it isn't facing the player. It's a possibility if you're saying it is 90 degrees off.

    Objects in layout face to the right (angle 0) by default, so if your artwork is facing down the layout then it wouldn't look like the turret was facing you even though it is.

  • thanks, i forgot to take into account the default direction of the sprites, changed my artwork to face in that direction!!

    work now!!

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