Author Topic: Tag Based Waypoint Scripting  (Read 225 times)

Legacy_Zeke

  • Jr. Member
  • **
  • Posts: 86
  • Karma: +0/-0
Tag Based Waypoint Scripting
« on: July 04, 2016, 11:04:55 am »


               
I want to talk about something that I came up these days.

 

I have a script that spawns a bandit NPC on an entrance of a Tavern while the player is inside. As I don't want to create a new script every time I spawn something I created four (can be more) waypoints with tags WPSpawn_1, WPSpawn_2 and so on.

 

When I want to spawn the bandit at the door I put WPSpawn_1 there and name it with the resref of the bandit. I then run the wps1_activate.nss script which creates an object at the nearest WPSpawn_1 waypoint to the PC with resref equal to the name of that waypoint.

 

The other waypoints are in case I want to spawn another creature in that area. They have their own wps*_activate.nss scripts.

 

As I am sure that I am not the first one with such idea, I want to know if someone else has done something similar and you can give some tips or more ideas. I have the feeling that this system can be expanded a lot more as I am always trying to have as little scripts as possible for all kind or repeated tasks that are almost identical to each other (like spawning creature at waypoint).

 


               
               

               
            

Legacy_Neverwinter Owl

  • Newbie
  • *
  • Posts: 22
  • Karma: +0/-0
Tag Based Waypoint Scripting
« Reply #1 on: July 04, 2016, 11:34:09 pm »


               

I use this idea as an area spawn script. It checks to make sure there's no PCs or creatures already in the area, then it compares timestamps to make sure at least 15 minutes has passed since last spawning, and then loops through all the areas WPs and spawns in creatures based on matching resrefs.


 


You can expand something like this to check variables as well, since you can hard set variables onto waypoints in the toolset. These variables can control anything from spawn count, day/night only spawns, and even a selection of other creature resrefs to spawn alongside.



               
               

               
            

Legacy_SHOVA

  • Hero Member
  • *****
  • Posts: 893
  • Karma: +0/-0
Tag Based Waypoint Scripting
« Reply #2 on: July 05, 2016, 03:50:07 am »


               

you might want to look at the NESS system, for other ideas on what can be done with way point scripting. It's on the vault, and can be found when it isn't acting up.