BioWare Forums: View Post For Code Display


You are viewing a single post. Please do not take this post out of context.
Read the full topic: Post Working Scripts Here

Author Sticky: Post Working Scripts Here
SlyyDaugg Posted: Friday, 26 July 08:56AM
Here's a simple little script I like to called "b****slapped." Basically it allows an NPC to make a single attack on a player during a pause in a conversation without the player automatically attacking back. I am using this script on a crotchety old man who, when the player talks back, gives said player a whallup, and then the conversation continues without ever really ending.

Put this script in the actions tab of the line of conversation you want your NPC to dish out a B****slap:

NWScript:
void main()
{
object oPC = GetPCSpeaker();
DelayCommand(2.0, SurrenderToEnemies()); 
// this delay ends the combat round after a single "slap"
ActionPauseConversation();
ActionAttack(oPC, TRUE); //TRUE keeps NPC passive
}


Now place this line in the OnCombatRoundEnd of your NPC:

NWScript:
ActionResumeConversation();


I probably wouldn't use this script with an NPC that was meant for killing, but for "strictly-conversation" NPCs with a bad attitude it can be fun.

[ Edited By SlyyDaugg: Friday, 26 July 06:57AM (GMT) ]

This post taken from the BioWare Forums
Powered by BioBoards Version 2.05.011
Please read our Copyright and Trademark Information