Kylo Cierra's Forum Posts

  • 2 posts
  • Wait. I found my problem.

    Earlier on in the sheet when I spawned the turret item, I think I set its angle to 270 effectively locking it in place. Will check.

    *edit* Yes, this was my problem. Changed the spawning logic to work once, instead of every tick fixed this.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm having a similar problem. I've tried tackling it several ways and seem kind of stuck.

    Ideally, I want a limited-rotating turret to slowly move towards either 20-degrees left or right as long as either left or right arrow are held down.

    My first attempt:

    Turret.Angle = 270

    On Left Arrow is down, Rotate Turret 5 degrees toward 250

    On Right Arrow is down, Rotate Turret 5 degrees toward 290

    In practice, what happens is as long as I hold left, the turret snaps to 265 (270-5) and stays there... so basically it's only updating that condition one tick when Left is pressed, rather than constantly while it's held down.

    ... I tried tackling it this way:

    Turret.Vector = 0

    Turret Angle = 270+Vector

    On Left Arrow down, set Vector = -20

    On Right Arrow down, set Vector = 20

    Every Tick, rotate Turret 10 degrees toward Turret Angle (270+Vector)

    Still no dice, it's rotating 10 degrees either direction only, so it's still updating only once. I just started using Construct 2 this week, so maybe there's something I'm missing about how to get this to update every tick?

  • 2 posts