Author Topic: NESS Patrol Route  (Read 735 times)

Legacy_YeoldeFog

  • Sr. Member
  • ****
  • Posts: 415
  • Karma: +0/-0
NESS Patrol Route
« on: March 19, 2014, 10:23:20 pm »


               

Hey!


 


Is it possible to change a patrol route in a patrolroute waypoint?


 


Example:


 


I have an NPC that will random walk between three waypoint (A, B and C). When he comes to waypoint C, then I want the creature to completely change the patrol route to a sequential/despawn instead.


 


To talk with NESS terms, he use PR02T2 and walks between PR02_SN1, PR02_SN2 and PR02_SN3. When he comes to PR02_SN3, then I want him to instead start using PR03T3, walking PR03_SN1, PR03_SN2 and PR03_SN3 then despawning.


 


I have an idea to use a script at stop number 3 (PR02_SN3_SC010). The script could tell the NPC to change the patrolroute from PR02 to PR03, but I have no idea how to make that!


 


Help!


 


/YeOldeFog



               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
NESS Patrol Route
« Reply #1 on: March 19, 2014, 10:31:40 pm »


               

interesting idea. i don't know of a way to do this in NESS using only NESS tags.


 


If I was tackling this I'd look at the local variables that are setup in a patrol, and then write a function that allows me to change all of those and reset the patrol. I'd call this new function in a script from a particular way point.


 


It may be however that you could use NESS's functions for setting up a patrol, but manipulate the inputs.



               
               

               
            

Legacy_meaglyn

  • Hero Member
  • *****
  • Posts: 1451
  • Karma: +0/-0
NESS Patrol Route
« Reply #2 on: March 19, 2014, 11:14:46 pm »


               

You can do that with AWW pretty easily. 


 


Use NESS to spawn the creature (not for with patrol, just "regular" waypoints) and have the first route use his normal tag. If the waypoints are the same you have a script on arrival of the one when you want things to change just change the walk mode to rev circular and it will go back down. Then have an arrival script on the first one that, if the walk mode is rev circular despawns the creature.


 


If the way point you wanted to use on the way back were different you could just change the Vtag of the creature on arrival at C and have it walk the other ones until it hit the one at which you wanted to despawn.


               
               

               
            

Legacy_YeoldeFog

  • Sr. Member
  • ****
  • Posts: 415
  • Karma: +0/-0
NESS Patrol Route
« Reply #3 on: March 20, 2014, 07:52:00 pm »


               

Thank you Maeglyn, but It's still too advance for me. I don't understand what you mean, and I would rather not use another waypoint-system when I think the solution with ness is just a line of code :/



               
               

               
            

Legacy_YeoldeFog

  • Sr. Member
  • ****
  • Posts: 415
  • Karma: +0/-0
NESS Patrol Route
« Reply #4 on: March 20, 2014, 11:49:01 pm »


               

Maeglyn: Can NPCs be spawned with NESS, use AWW, then be despawn by NESS or AWW?



               
               

               
            

Legacy_meaglyn

  • Hero Member
  • *****
  • Posts: 1451
  • Karma: +0/-0
NESS Patrol Route
« Reply #5 on: March 21, 2014, 04:07:54 pm »


               


Maeglyn: Can NPCs be spawned with NESS, use AWW, then be despawn by NESS or AWW?




 


I have not looked into an explicit despawn operation you can call via NESS.  I was thinking you just use DestroyObject.


 


But yes, you can spawn with NESS, use waypoints and the despawn however you want. AWW is just a replacement for WalkwayPoints so if you use the AWW default scripts (or modify your spawn, HB and perception scripts to use AWW) then you get waypoint walking just like normal. You can certainly spawn things with NESS which walk normal waypoints.  Same thing here.


 


AWW is not a spawning/despawning system, just waypoint walking with enhancements. One of those enhancements it to be able to control


the order waypoints are walked in. That addresses your first part (by using random walk order). Another of the enhancements is the ability to run arbitrary scripts on NPC arrival at any waypoint. That can be used to handle the second part. A third the is the ability to specify a virtual tag which is used to select the waypoints the NPC walks. You can change this anytime via scripting so the NPC can be made to use a totally different set of waypoints if needed.


 


I'm not saying this can't be done with NESS. It may well be possible to have a script which modifies the settings on the spawn or the child from a patrol node arrival. I have not looked.  I doubt it's one line of code though. Those spawn flags are all read and configured when the spawn WP is first initialized if I recall.


               
               

               
            

Legacy_YeoldeFog

  • Sr. Member
  • ****
  • Posts: 415
  • Karma: +0/-0
NESS Patrol Route
« Reply #6 on: March 22, 2014, 07:16:51 am »


               

It is possible to have patrol routes with NESS, and the NPCs can be made patrolling the waypoints in ascending/descending, circular, walk once/despawn or random order. It's also possible to run script on every single waypoint, just like AWW. I need the despawn feature because I spawn random NPCs, walking from one place to another. It's more like a visual illusion that something is going on in the city.


 


I have lookied at AWW, but I haven't figured out how to change the waypoints in a waypoint. I don't think I have that many skill points in Decipher documention! '<img'>


 


Basically, I want a npc to follow a path of waypoints A --> B---> C then randomly pick a new destination between D, E, F, walking for example D1, D2, D3 or F1, F2, F3, etc. This will simulate NPCs walking around in the city to different destinations, but following paths of waypoints to avoid getting stuck.


 


The first waypoint (A) will be the spawn waypoint, and I can do that with NESS. The last waypoint (example: D3), need to be the despawn waypoint. And I guess I can call a NESS despawn script from the AWW scripts on waypoint D3?!



               
               

               
            

Legacy_meaglyn

  • Hero Member
  • *****
  • Posts: 1451
  • Karma: +0/-0
NESS Patrol Route
« Reply #7 on: March 22, 2014, 08:40:00 pm »


               


I have lookied at AWW, but I haven't figured out how to change the waypoints in a waypoint. I don't think I have that many skill points in Decipher documention! '<img'>




 


That's probably my fault. The documentation is really geared towards scripters '<img'>


 


 



Basically, I want a npc to follow a path of waypoints A --> B---> C then randomly pick a new destination between D, E, F, walking for example D1, D2, D3 or F1, F2, F3, etc. This will simulate NPCs walking around in the city to different destinations, but following paths of waypoints to avoid getting stuck.


 


That sort of thing is more or less the reason I put the vtag code in there.  The ability to have the NPC change which WPs she is walking is really useful. My longer term plans are to have road networks made up of other tags and have code to have NPCs find the right road to use to get from current location to destination wp. Right now the framework for that is in place. For your purposes you can lay out the sets of waypoints you want


and have code at C set the NPC's vtag to the tag for D, E or F randomly. Then have D3, E3, F3 have a DestroyObject call on arrival. These use the normal WP naming scheme (i.e. WP_<tag>_01)


 


If you want to make a small module with a simple area in it and set it up with NESS spawning your NPC, and place the sets of waypoints you want I would be willing to set up AWW for you to do what you are asking for as I have time.


               
               

               
            

Legacy_YeoldeFog

  • Sr. Member
  • ****
  • Posts: 415
  • Karma: +0/-0
NESS Patrol Route
« Reply #8 on: March 23, 2014, 10:58:15 am »


               

Maeglyn: That is much appreciated! I will send you a PM with a link to the module as soon as I've made it! Also, is it possible to play a permanent looping animation with AWW? (Like, a guard making the "Look Far" animation).



               
               

               
            

Legacy_meaglyn

  • Hero Member
  • *****
  • Posts: 1451
  • Karma: +0/-0
NESS Patrol Route
« Reply #9 on: March 24, 2014, 01:18:05 pm »


               

I sent it back to you with the stuff you asked for working.  Yes, you can do this sort of thing. Your best bet for that is to make it an activity.



               
               

               
            

Legacy_YeoldeFog

  • Sr. Member
  • ****
  • Posts: 415
  • Karma: +0/-0
NESS Patrol Route
« Reply #10 on: March 26, 2014, 11:25:59 pm »


               

Much appreciated! Everything works just as intended! '<img'>