Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.95a is out! (03/26/21); Blog post: Skill Changes, Part 2 (07/15/21)

Author Topic: Unable to lock controls of fighters  (Read 1405 times)

Clockwork Owl

  • Admiral
  • *****
  • Posts: 770
    • View Profile
    • Starsector South Korean Community
    • Email
Unable to lock controls of fighters
« on: May 29, 2017, 05:24:35 AM »

both noStrafing = TRUE on ship_systems.csv and ShipAPI.setControlsLocked(true); via script does not prevent a bomber from strafing near its target.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 18940
    • View Profile
Re: Unable to lock controls of fighters
« Reply #1 on: May 29, 2017, 09:02:28 AM »

Yeah, pretty much a consequence of how fighters work. If you really need to lock their controls, you'd have to set their facing and velocity directly.
Logged

Clockwork Owl

  • Admiral
  • *****
  • Posts: 770
    • View Profile
    • Starsector South Korean Community
    • Email
Re: Unable to lock controls of fighters
« Reply #2 on: May 29, 2017, 05:49:29 PM »

...How do I set the velocity, though?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 18940
    • View Profile
Re: Unable to lock controls of fighters
« Reply #3 on: May 29, 2017, 06:09:41 PM »

ship.getVelocity().set(x, y) should do it.
Logged

Clockwork Owl

  • Admiral
  • *****
  • Posts: 770
    • View Profile
    • Starsector South Korean Community
    • Email
Re: Unable to lock controls of fighters
« Reply #4 on: May 29, 2017, 09:24:59 PM »

It immediately ejects them to oblivion. :D

EDIT: Nevermind, I was doing it wrong XD Fixed. But the fighters are still strafing out of course.
« Last Edit: May 30, 2017, 03:49:51 AM by Aron0621 »
Logged