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.

Attack Drone AI

Discussion in 'Programming (In-game)' started by Keten Kennek, Sep 19, 2017.

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

    Messages:
    54
    Are there any useful Attack Drone AI scripts? I see a bunch on the Workshop, but either old, broken, poorly implemented, or merely a copypasta of Keen 'Enemy AI' scripts.

    I'm looking to deploy a ' guard dog ' drone. Simple, stay within @100 - 200m of it's spawn point (a projector). circle the guard station, attack anyone that comes close....

    Drone is a 'fighter' = 3x gatling no missiles.

    Thanks all,
     
  2. Wicorel Senior Engineer

    Messages:
    1,243
    I have been working on some stuff, but nothing is released yet.

    Do you have a blueprint of the ship in mind?
    How do you expect to detect 'anyone that comes close"?
    Sensors are limited to 50meters; is that 'close'?
     
  3. Georgik Apprentice Engineer

    Messages:
    215
    What about power management? Resupply? Repairs? Is it for planet purposes?
     
  4. Ronin1973 Master Engineer

    Messages:
    4,830
    The script you're envisioning isn't that complicated. Why not learn to code it yourself? You have specific needs so it's highly unlikely it will appear in the workshop.

    1. Anchor itself to a specific origin point.
    2. Do not travel further than 200 meters from that point.

    This can be achieved if your using GetNearestPlayer. You draw a line from the origin point to the nearest player. If that nearest player is within a certain range, then move to a point on that line that's a maximum of 200 meters. So the logic would be

    If the enemy player is less than 200 meters from origin, go to the enemy position. If the enemy player is more than 200 meters away, then fly to a point that's 200 meters from the origin on a line between the origin and the player. You can add more logical conditions, but that's basically how I would solve the problem.
     
  5. Georgik Apprentice Engineer

    Messages:
    215
    Wait, we don't even know if he will be the master of the drone, or will it be a part of enemy pirate's station?
     
  6. Wicorel Senior Engineer

    Messages:
    1,243
    Apparently not. We need more info..
     
  7. theCalcaholic Trainee Engineer

    Messages:
    38
    FYI, GetNearestPlayer will only work on pirate drones.
     
  8. Jon Turpin Apprentice Engineer

    Messages:
    162
    I am also working on something, which will work just fine if you're planning to put turrets on the drone (I'd just have to adapt it to use calculations for firing a weapon - much easier than what I'm trying to accomplish). Currently, I'm writing the script for the drone to kamikaze into an enemy with a load of nukes on board.
     
  9. Ronin1973 Master Engineer

    Messages:
    4,830
    DERP... most people who program in-game know this.
     
Thread Status:
This last post in this thread was made more than 31 days old.