It makes a NPC move around in an area during the day, and when night comes, he moves to the other area and wander around until next day
First, you must activate this line in he "on load" module properties :
SetModuleSwitch(MODULE_SWITCH_ENABLE_CROSSAREA_WALKWAYPOINTS, TRUE);
You must create 6 waypoints with the following tags (of course, change "tagofyournpc" by the real tag of your NPC...)
-"Tagofyournpc_DayArea" is where the NPC is during the day, wandering around
-"Tagofyournpc_NightArea1" is in front of the door, or transition to the night area
-"Tagofyournpc_NightArea2" is where the NPC is supposed to arrived in the night area
-"Tagofyournpc_NightArea" is where the NPC is during the night, wandering around
-"Tagofyournpc_DayArea1" is in front of the door, or transition to the day area
-"Tagofyournpc_DayArea2" is where the NPC is supposed to arrived in the day area
You can use it with areas where your PC can't go : for example an area where all NPC go during the night but from different doors, as if they were going home.
It is used in the "On Heartbeat" slot and hasn't been tested for multiplayer module.
please report any bug to me through Link (contact)
Posted by shockwolf at 2008-07-09 15:12:45 Voted 8.50 on 03/14/08
Ok I�ve got a bug to report. I think I�ve also sent this report to the link but it�s not in English so I can�t quite tell if I�ve done it right or whether it will reach the right person.
Ok I�ve found that if you stop an NPC by talking to them whilst they are making a move to the next area they forget what they are doing and stand around doing nothing until the next shift. Also on rare occasions they may get stuck on an obstacle and continue to try and walk through it for the rest of the shift unless you talk to them in which case they forget what they are doing again.
Zhjaeve � Know that I must begin every sentence with the word �Know�. Know that everything I say must be known. Know that it is important that you know this.
Posted by shockwolf at 2008-03-14 05:00:51 Voted 8.50 on 03/14/08
Ok I�m about to answer my own question because I�ve solved it. I may as well post it here in case anyone else wants to do the same as I am.
It�s a simple as changing the last line from random walk to executing another script!
Doing this you can even get them to follow waypoints by making the default On Heartbeat �nw_c2_default1� script execute at the same time.
I�ve tested this and it works. The NPC followed his waypoints all day long and when it became night he suddenly stopped and went home. Using this command I would imagine you can get NPC�s to do all sorts of things depending on the other script. I�ve also set up Tavern performers to spawn in at night behind the stage curtains and walk out on to the stage and start dancing and playing instruments. When the morning comes the music stops and they disappear behind the curtains. It works great!
Zhjaeve � Know that I must begin every sentence with the word �Know�. Know that everything I say must be known. Know that it is important that you know this.
Posted by shockwolf at 2008-02-27 06:25:27 Voted 8.50 on 03/14/08
Cheers KaG. That's a shame about the waypoints. But about the animations and the version of the script you use; would you be able to give us an example of how you've coded the animation commands at the end of the script please? I'm pretty sure I suck more than you at scripting! lol _________________________ ShockWolF - Author of Wulverheim
Zhjaeve � Know that I must begin every sentence with the word �Know�. Know that everything I say must be known. Know that it is important that you know this.
Thx for your comments,
For information, I suck at scripting to :)
1) it should be possible and in fact, there is a way to do that with NWN2 scripting, but... it seems it doesn't work.
2) it is possible by modifying the script on the lines with the randomwalk command. If you do so, you have to make, of course, different scripts for your animations.
For example, in my module, there is a bard who plays luth, and a dancer who... dances :)
At night, they get back home.
Posted by shockwolf at 2008-02-23 03:31:06 Voted 8.50 on 03/14/08
This is really good guys! Not voting just yet but can I please make a suggestion? I don�t know how difficult it would be to do because I suck at the whole scripting thing myself.
Would it be possible to make 2 other versions of this script? So that instead of randomly walking around in the area they:
1. Follow waypoints (based on the NPC�s tag as normal)
2. Stop and chat with other NPC�s (maybe do random animations)
This would make it absolutely awesome IMO. Of course it would be perfect if someone could make the NPC�s behave like the ones in ES IV: Oblivion. Eating, sleeping, going to work, saying hello to you in passing, stopping to chat e.t.c but that would be asking for way too much I know! The 2 variations above would make it good enough for me though.
If you are willing to attempt it then Thanks in advance!
Zhjaeve � Know that I must begin every sentence with the word �Know�. Know that everything I say must be known. Know that it is important that you know this.
Posted by ladyelvenstar at 2007-11-21 08:15:41 Voted 9.00 on 11/21/07
Thank you! I have been trying to get something like this system set up for my campaign but I am no scripter by any means. I really appreciate all of you sharing this with us. _________________________
Gaming Parents Studios - Currently working on A Time to Die Act I and Into the Forgotten Realms
Vault Submissions: Movie Trailer of A Time to Die | Unicorn Run Prefab **NEW**
You must be Logged In to post comments in this section.
10 - A Masterpiece, Genuinely Groundbreaking 9 - Outstanding, a Must Have 8 - Excellent, Recommended to Anyone 7 - Very Good, Deserves a Look 6 - Good, Qualified Recommendation 5 - Fair, Solid yet Unremarkable 4 - Some Merit, Requires Improvements 3 - Poor Execution, Potential Unrealized 2 - Very Little Appeal 1 - Not Recommended to Anyone