Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Technical Info concerning Interiors
06-14-2009, 08:52 AM,
#36
How to create a multi point patrol route?
CS Wiki.

S = Screenshot
Destination = AI location



A few important requirements.


Keep in mind that AI packages are executed from the top to the bottom (higher to lower priority).

  1. The editor location = starting point of the patrol and place the NPC on top of the marker.

  2. You need a "GuardPatrolBegin" package (S) with a location "near editor" (screenshot). It's has to be below the other patrol packages (lowest priority). There's no GetDistance condition and "must reach location" has been checked.

  3. The GetDistance value for example <128 (S) shouldn't conflict with the other X-markers. In other words, the NPC follows the pathgrid and can't walk near (<128 ) another marker from the patrol route. If so, it would interrupt the AI loop.

    If you use 2048 in a small interior it doesn't work, it could in a large dungeon. In fact keep it always small, around 128 will work fine.

  4. The reference or marker (function info) for the GetDistance value is the same as the current location.

  5. You can use X-markers or X-marker headings, it doesn't matter, it's only a reference point.

  6. Always check "must reach location".


Why does it work?

[blockquote]
The GuardPatrolBegin pack is lowest in the patrol list and the NPC starts there (editor location). In the Areya test example (S) from Soluthis (StRwNPCmlapGuardDay01) there are 4 patrol points (03, 13 and 17) including the GuardPatrolBegin (19).

The top pack 03 (highest priority) will be executed before the other packs (GetDistance for the marker 19 on the editor location <128 ), the destination will be the marker for pack 03, because of the must reach location flag the NPC can't return to the editor location.

Pack13 (GetDistance near marker 03 <128 ), sets the destination for the marker of pack 13, because of the must reach location flag the NPC can't return.

Pack17 (GetDistance near marker 13 <128 ), sets the destination for the marker 17, because of the must reach location flag the NPC can't return.

After reaching marker 17 the other packs (03/13/17) don't pass the distance (condition) test, distance >128 from their markers and the GuardPatrolBegin pack ensures that the NPC returns to the editor loc. (must reach location flag).

As long as the time and duration are true, the NPC will continue to patrol (AI loop).

[/blockquote]


[Image: tn_attachment-10372.jpg] [Image: tn_attachment-10373.jpg] [Image: tn_attachment-10375.jpg]

GuardPatrolBegin pack | GetDistance value | AI packs
Dum loquor, hora fugitĀ  - While I speak the time flies



Ovid 43 BC - 17 AD


Messages In This Thread
Technical Info concerning Interiors - by sandor - 04-24-2006, 03:30 PM
[No subject] - by sandor - 04-25-2006, 04:18 PM
[No subject] - by sandor - 04-26-2006, 01:50 PM
[No subject] - by sandor - 04-27-2006, 03:16 PM
[No subject] - by sandor - 04-28-2006, 04:30 PM
[No subject] - by sandor - 04-29-2006, 02:55 PM
[No subject] - by sandor - 04-30-2006, 02:13 PM
[No subject] - by sandor - 05-01-2006, 02:34 PM
[No subject] - by sandor - 05-06-2006, 03:25 PM
[No subject] - by sandor - 05-07-2006, 07:34 PM
[No subject] - by sandor - 05-08-2006, 12:28 PM
[No subject] - by sandor - 05-09-2006, 03:41 PM
[No subject] - by sandor - 05-11-2006, 03:16 PM
[No subject] - by sandor - 05-16-2006, 08:48 AM
[No subject] - by sandor - 05-17-2006, 03:08 PM
[No subject] - by sandor - 05-22-2006, 11:32 PM
[No subject] - by sandor - 05-25-2006, 12:57 PM
[No subject] - by sandor - 05-29-2006, 01:53 PM
[No subject] - by sandor - 06-19-2006, 09:02 PM
[No subject] - by sandor - 06-28-2006, 04:11 PM
[No subject] - by sandor - 06-29-2006, 06:32 PM
[No subject] - by sandor - 07-16-2006, 10:51 PM
[No subject] - by sandor - 08-19-2006, 03:49 PM
[No subject] - by sandor - 09-27-2006, 08:52 AM
[No subject] - by sandor - 09-27-2006, 04:43 PM
[No subject] - by sandor - 09-27-2006, 07:24 PM
[No subject] - by sandor - 10-11-2006, 04:26 PM
[No subject] - by sandor - 10-18-2006, 08:05 AM
[No subject] - by sandor - 01-05-2007, 06:55 PM
[No subject] - by sandor - 04-23-2007, 02:47 PM
[No subject] - by sandor - 10-21-2007, 10:58 AM
[No subject] - by sandor - 03-12-2008, 02:41 PM
How to create a multi point patrol route? - by sandor - 06-14-2009, 08:52 AM
[No subject] - by sandor - 06-11-2012, 12:17 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)