 |
|  |
 |
|
Jamski
|
 |
lol ED&D is officially full PvP LOL
May 2002 time: 05:32
|
|
Ah, I think I may be just the person to ask 
First, place the NPC on the map.
Second, r-click on the NPC and place a waypoint.
Third, r-clivk on the way point and look at the name of the waypoint. It should be something like WP_NPCname_00
Fourth make a NEW way point where you want the NPC to walk to.
Call the new waypoint WP_NPCname_01
Add waypoints always using the same system.
The NPC will automatically walk its waypoints as soon as it is spawned, in the order 00,01,02,03 untill the last one, then it works through them in reverse.
To make the NPC NOT walk untill you want it to add ClearAllActions() to the end of the on-spawn script. To make it walk add ActionWalkWaypoints() to the script when you want it to do so.
If that doesn't work, tell me exactly what you want, and I'll try and make a script for it.
-Jam
|
|
|  |
 |
|  |
 |
|  |
 |
|  |
 |
|  |
 |
|  |
 |
|  |
 |
|
DarkCloud
|
 |
of Lists
Jul 2000 time: 05:32
|
|
Well Jamski, I can't even seem to get the character able to move to a waypoint in the middle of a conversation tree.
(I know very little of C++...)
But here's the best I could do; after the void main()
{
AssignCommand (OBJECT_SELF, ActionWalkWaypoints(WP_caretaker_05);
}
and it told me that (ActionWalkWaypoints) was an undefined identifier.
-
After I work out his movements, I'll try the screen-to-screen thing 
Just wondering since the NWN site says that this is possible:
- quote: 3. What if I want part of the circuit to cross an area transition... like going into a house or something?
As I understand it (according to a recent conversation with Preston, who wrote the AI), this works fine. I suspect you would have to have a regular area transition created by the wizard, however.
I recently tried this out, creating a peasant who walked four waypoints, two of them being in another area (inside a house). I then planted a house tile in the main area and connected the two with a door. He left the door open after he used it the first time, but otherwise it worked fine.
|
Do you think that it might be possible to create a cleaner transition in-conversation movement between the areas?
Since it does seem that they can move between screens?
Also about waypoints- can I make a character stop at one and wait until he is approached by the player.
-
and another question on conversations: can I get my character to OnSpawn go to the player and talk to him if he sees the character...
In the module the character is in one room and the caretaker is in another... the caretaker takes a circuit and I want him to say hello when he sees the player.
I've been reading through the guides, but am sill looking for how to do this.
---
um... if I'm overburdening you, please say so- I'm registered on the NWN boards (but find it difficult to psot there because of thread loading times... I do save threads from here however, thanks to your advice)
|
|
|  |
 |
|
Jamski
|
 |
lol ED&D is officially full PvP LOL
May 2002 time: 05:32
|
|
Making NPCs Initiate Dialogue (untested, but should work)
When the NPC sees a PC, he or she will walk up to the PC and start a conversation.
This will not work if the PC starts visible to the NPC (no OnPercieve event fires).
Create an OnSpawn (by editing the standard OnSpawn) with: SetSpawnInCondition (NW_FLAG_PERCIEVE_EVENT); uncommented.
In your NPC's dialogue file, go to the very first line where he starts his dialogue with
the PC. If you only want him to start this with any given PC once, add the following script
into Actions Taken:
code:
void main()
{
SetLocalInt(GetPCSpeaker(), "Dlg_Init_" + GetTag(OBJECT_SELF), TRUE);
}
This sets the variable that is used in the script you were using, so the dialogue
isn't done more than once. Now create a new script in the OnUserDefined event for your NPC.
You can put that second script in here, as follows:
code:
void main()
{
int nEvent = GetUserDefinedEventNumber();
if (nEvent == 1002) // OnPerceive event
{
object oPC = GetLastPerceived();
if(GetIsPC(oPC) && GetLocalInt(oPC, "Dlg_Init_" + GetTag(OBJECT_SELF)) == FALSE && !IsInConversation(OBJECT_SELF))
{
ClearAllActions();
AssignCommand(oPC, ClearAllActions());
ActionMoveToObject(oPC);
ActionStartConversation(oPC);
}
}
}
Now the first time the NPC COMES INTO SIGHT of the player, he should apporach and start his conversation. By adding a second conversation branch, you can mek him say someting else when the PC come up to him later.
Should work *crosses fingers*
As for making them move....
-Jam
|
|
|  |
 |
|  |
All times are GMT. The time now is 05:32. Apolyton Time is 00:32. |
top of page
|
| archivepost |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|