Welcome to Keen Software House Forums! Log in or Sign up to interact with the KSH community.
  1. You are currently browsing our forum as a guest. Create your own forum account to access all forum functionality.

Get nearby ships from antenna

Discussion in 'Programming (In-game)' started by Florian, Mar 17, 2019.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. Florian Trainee Engineer

    Hi guys,
    Pretty new to scripting in SE.
    I want to write a script that warns me if an enemy ship is nearby.
    After grinding duckduckgo for bits and pieces of documentation :p the best thing i found was:

    Im decent with C# so all im looking for is a function that returns a Collection of some type T where i can check if T is hostile.
    I thought the Antenna Interface was the first thing to look into...

    If you guys could also provide me with the most up-to-date documetnation i would be very thankfull. :tu:
  2. Malware Master Engineer

  3. Ronin1973 Master Engineer


    The data is in the game, else it wouldn't know where to place markers in the HUD/GUI. However they aren't exposed to in-game API. It's a short-coming in my opinion as they are "flags" that the player can react to and interpret... so why not the programmable block. Enemy ships, friendly ships, ore deposits, even players... having this exposed would open up a lot of possibilities in automation.
  4. Malware Master Engineer

    It's not as simple as it may seem unfortunately. This is not an intentional lack of feature, it was attempted once... By rexxar I think? It's not just about exposing something already existing. As it stands right now, without a not insignificant rewrite, access to this information in the required place would cause a recursive assembly reference (one dll referencing another which again refers to the first) which is if course not possible. Given that there's exactly 0 specially allocated resource hours to fix pb stuff... Well. Not likely to happen.
    • Informative Informative x 1
  5. mric Trainee Engineer

  6. gothosan Junior Engineer

    Only option I could see it done via script is if a ship broadcast its position for others to pick up via inter-grid communication, but then again why to use it if you see the marker on the screen?
  7. BobbySix Trainee Engineer

    It's less about complexity than just about indirect way.

    It's very obvious than an Antenna can't just have the same behaviour than a Sensor or a Turret with just an increased range.

    But maybe the coordinate getting way of antenna is basically different, and dedicated for high range getting without perf issue or stuff like that.
Thread Status:
This last post in this thread was made more than 31 days old.