TTLG|Thief|Bioshock|System Shock|Deus Ex|Mobile
Results 1 to 7 of 7

Thread: Escape points question

  1. #1

    Escape points question

    So I'm working on fleeing AI, and basically it looks like all the AI, across multiple floors run to the same escape point located on the 2nd floor, even tho I've placed escape points all over the place.
    On top of that, AI located in a place that has no direct route for the AI to reach upper floors does not flee at all, even tho there are escape points located in his area.

    I'm getting confused on how this works, does AI prioritise some escape points over other? If so, how can I change it for specific AIs?

    AI setup:

  2. #2
    Dóttirin klęšist oft móšur möttli
    Registered: Apr 2015
    Maybe pathfinding doesn't work.

    You can set a custom flee point very each AI

    AI--Response--Alert response

    set a Goto object command there, also set the speed (very fast or fast)

  3. #3
    Ok I did some initial testings, it really seems to me AI priorities escape points in order I placed them or something. I had around 3 escape points per floor, but I deleted all the new ones and placed the first 3 old ones across all floors. (1 per floor)
    And it seems to be working now, tho I admit it is kinda confusing.

    Thanks Unna for the tip.

  4. #4
    Registered: Jan 2001
    Location: Pushing my luck with Dromed
    The distance is also taken into account, but I think it's calculated as a straight-line distance between coordinates, not the overall route, so a FleePoint on the next floor directly above the AI will be considered closer than another one on the same floor but at the opposite end of the building.

  5. #5
    Registered: Apr 2011
    It’s straight-line distance, yes, but the Z distance is slightly more complicated than that. If the Z coordinate difference to the flee point is less than 10 feet, then only the X and Y coordinates are taken into account when calculating the distance, i.e. sqrt(x^2 + y^2); otherwise the Z difference is *doubled* when calculating the distance, i.e. sqrt(x^2 + y^2 + (2*z)^2). I guess the idea is that the AI should slightly prefer to flee on level ground than up or down stairs?

    AIs will also never flee to a flee point that’s within 20 feet of themself or within 20 feet of whatever they’re fleeing from (both using the above distance measurement). This might be the reason some of your AIs weren’t flee to points near them.

    After this, the weight of the flee point (i.e. the value of the Flee Point property on it) is used to pick the preferred flee point; it can have a maximum of 1.0. If the direction to the point (in a straight line) is towards the pursuer, then the weight is divided by 5. Then the distance divided by the weight is used to sort the flee points in preferred order. This means that a weight of 0.5 makes a flee point rank as if it was twice as far away; a weight of 0.33 makes it rank as if it was 3x as far, and so on. Once the points are ranked, then the AI attempts to pathfind to them in order; it will pick the first one that it can pathfind to.

    If you create AIFleeTo links from an AI to one or more flee points, then it will only consider those points when deciding where to flee; otherwise it will consider all the flee points in the mission (up to a max of 256). In either case, the above distance and weight checks apply.

    If you create AINoFlee links from an AI to one or more flee points, then it will never consider those points when deciding where to flee; the expiration property of the link is unused.

    (Remember too that the Flee Point property can be placed on guards, not just fixed objects. The flee code doesn’t care—so it also doesn’t know or care if the guard is alive or not.)

    (I was going to put all this sort of stuff into the Dromesday book last year, but I didn’t have edit permissions.)

  6. #6
    Registered: Jan 2001
    Location: Pushing my luck with Dromed
    That's good information, thanks for posting. Did you get that from the leaked source code or did you experiment?

    Also, try again with the Dromesday Book. I just looked at the list of users and saw you as 'unverified', and my account seems to have permission to change users' statuses.

  7. #7
    wow, great insight vfig, thanks a lot!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts