Jump to content

Scripting an NPC to be attacked in dialogue


Recommended Posts

SOLVED

______________________________________________________________________________________________________________________

 

Hi. I'm fairly new to the forums, but I often mod my own game for fun. I have a fair amount of experience but I recently ran into a new problem.

 

I have a body guard following my character and I want him to attack the NPC I am talking to by selecting a topic. The issue is that you cannot call a reference variable in a script response. For example I can do this:

 

startcombat bodyguard ;the NPC attacks my body guard

 

but I can't do this:

 

ref target

set target to getself

bodyguard.startcombat target ;my body guard attacks the NPC

 

When you call a reference variable in a script response the construction set doesn't complain, but it will crash upon saving. The first example causes the NPC to attack my body guard, making the NPC a criminal, but I want my body guard to attack the NPC so that my body guard gets the bounty.

 

Does anyone know a work around or a way of getting this to work?

 

Thanks

BobbyHollowHead

Link to comment
Share on other sites

Nevermind. Since the problem was due to a lack of scripting capability in the dialogue menu, I placed in a middleman. Now instead of trying to directly script my body guard to attack the NPC I scripted to add a spell effect which added a script that allowed my body guard to attack the NPC.
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...