NPCs speaking to each other
#1
Posté 25 janvier 2012 - 11:09
Thank you.
#2
Posté 25 janvier 2012 - 12:27
#3
Posté 25 janvier 2012 - 02:47
#include "ginc_group"
void main()
{
object oNpc1 = GetNearestObjectByTag("npc1");
object oNpc2 = GetNearestObjectByTag("npc2");
if (IsMarkedAsDone() == FALSE )
if (GetIsPC(GetEnteringObject()) == TRUE )
{
AssignCommand(oNpc1, ActionStartConversation(oNpc2, "bark_npc", FALSE, FALSE, TRUE, TRUE));
MarkAsDone();
}
else return;
}
#4
Posté 26 janvier 2012 - 09:28
Of course, hoping that two randomly wandering NPCs will just happen to collide head-on is a bit optimistic, so scripting it to happen might be a better option.
Modifié par DannJ, 26 janvier 2012 - 09:28 .
#5
Guest_Iveforgotmypassword_*
Posté 27 janvier 2012 - 12:12
Guest_Iveforgotmypassword_*
#6
Posté 27 janvier 2012 - 12:24
If you have these variables on the npc, it will happen automatically and regularly, it's built into the game's default scripts.DannJ wrote...
I recently discovered that randomly wandering NPCs will occasionally start mimed conversations all by themselves. It seems that if two wandering non-hostile creatures in the same faction bump into each other head-on, they start playing conversation animations to each other for a while. I couldn't believe my eyes when two of my verbeegs started chatting to each other without me having to script anything.
Of course, hoping that two randomly wandering NPCs will just happen to collide head-on is a bit optimistic, so scripting it to happen might be a better option.
X2_L_SPAWN_USE_AMBIENT_IMMOBILE = 1
X2_L_SPAWN_USE_AMBIENT = 1
If the second one is on, the npc will wander around some, and react appropriately for things llike store, point of interest, and inn waypoints.
#7
Posté 29 janvier 2012 - 09:24
kamal_ wrote...
If you have these variables on the npc, it will happen automatically and regularly, it's built into the game's default scripts.
X2_L_SPAWN_USE_AMBIENT_IMMOBILE = 1
X2_L_SPAWN_USE_AMBIENT = 1
If the second one is on, the npc will wander around some, and react appropriately for things llike store, point of interest, and inn waypoints.
I was simply testing some Verbeegs to see what they looked like fully equipped (spear and shield) and moving about, so I replaced the default OnSpawn script with the one that causes creatures to wander randomly (called something like gp_wander from memory). I suspect that script sets the second variable you mentioned above (and possibly the first as well).





Retour en haut






