BioWare Atari
Información sobre BioWare Juegos de BioWare Soporte Foros Visit the BioWare Store
Neverwinter Nights Home
Neverwinter Nights Home

How Do I Make My NPC Attack The PC He Is Talking To?

Intended Audience: For Builders
By David Gaider

[Printer Friendly / Syntax Highlight]

You want to add a script that makes the NPC go hostile. Place the script in the 'Actions Taken' tab down on the bottom right of the dialogue editor... make sure you have the node selected where you want the battle to begin.

If you want the NPC's faction to become hostile against the target, use the generic script "nw_d1_attonend":

NWScript:

If, however, you just want the sole NPC to become hostile and attack, use the generic script "nw_d1_attonend02":

NWScript:

One thing to beware of: if you apply this script to the actual node where the NPC is speaking, they will go hostile right as the dialogue of that node is put up. Likely the NPC will not have time to read it all if it is a long piece of dialogue.

If you are OK with that, great. If not, use the Add button on the last NPC node to add a PC response. Erase the text in the PC response and press Enter... it should become an 'End Dialogue' node. Add the script to the 'Actions Taken' area for the End Dialogue, instead. This way, the player can read the dialogue the NPC is speaking... and when he presses 'Enter to Continue', the NPC will attack.

COMMON PROBLEMS: Make sure that a creature you want to go into combat does not have levels in Commoner. Commoners are set up by the generic AI to run away from hostiles and only form into a mob when there is both a level 10+ Commoner nearby.
Also make sure that if you are using the 'Special Behaviors' in the OnSpawn script (one of the special behavior command lines is uncommented) that you are not using the 'Herbivore' behavior. Herbivores also never engage in combat and will always run away.

 

 

Mass Effect Galaxy
Neverwinter Nights 2 Forums
Mostrar/Ocultar

English
Deutsch
Français
Español
Italiano

Mostrar/Ocultar

Ver las últimas pantallas 

Ver las últimas pantallas
Mostrar/Ocultar

Multiplayer Games at Neverwinter Connections

Today
Schedule a Game...



La hora actual es: (insertar hora)
dom, 22 noviembre 2009 03:11

Mostrar/Ocultar

Download Modules

Top NWN: HotU Modules:
1. Good vs Evil III
2. More...

Top NWN: SoU Modules:
1. Good vs Evil III
2. More...

Top CEP Modules:
1. The Lord of Terror The Diablo Campa...
2. More...

Top Modules - NWVault:
1. Hall of Fame
2. More...

Total Modules: 4423

Mostrar/Ocultar

5,050,043 usuarios de BioWare:
  53 conectados
  4 ocultos
  177 invitados

1308 Playing Online
  100% NWN
  101% NWN: SoU
  101% NWN: HotU

447 Registered Guilds

8,768,604 mensajes en los foros

Temas más recientes de los foros:
1. 2 newb problems: Lever puzzle, a... (NWN2: Builders - NWN2 Scripting)

2. Vorcha + Krogans o_0 (Mass Effect 2 General Discussion (No Spoilers Allowed))

3. Video games? (NWN 1: General Discussion (No Spoilers Allowed))

4. How to Change the Death Message (NWN 1: Toolset)

5. Toolset work with Vista? (NWN2: Builders - NWN2 Toolset)