Aller au contenu

Photo

I cant get NPCs to turn hostile?


1 réponse à ce sujet

#1
bigrickman

bigrickman
  • Members
  • 31 messages
sorry this is sort of a double post, realised this would be the better forum.
http://social.biowar.../index/431093/1

but anyway i'm trying to get a neutral npc to go hostile from conversation. On paper i'm sure everything is right but its just not working.

i'm using the plot action to trigger GEN_OWNER_TURNS_HOSTILE.

what am i doing wrong?
my whole mod is finished i just need to get this working. :(

#2
DavidSims

DavidSims
  • BioWare Employees
  • 196 messages
Hm, there are a few possibilities I can think of.

1. The creature isn't the owner of the conversation. If you're firing the conversation in an unusual way and manually assigning the speaker tag line by line, the owner in the script may not be the creature.

2. Group hostility isn't being set up properly. The PC group and the hostile group are made hostile to each other in scripting. I don't know exactly where, but it's properly either in module_core, or the custom module script used in the main campaign. If it's the former, make sure you aren't overriding any events and not passing them through to module_core. If it's the later, you're going to need a script somewhere, be it a module script or trigger or whatever, that calls SetGroupHostility(GROUP_HOSTILE, GROUP_PC*, TRUE);

*GROUP_PC might actually be GROUP_PLAYER or GROUP_PARTY or something similar. I'm going from memory.

3. The player isn't in the correct group. Related to the above, if you've got any kind of custom module or player script, it's possible the player isn't being put into the correct group. To verify, you could creature some kind of debug script which checks if (GetGroupId(GetHero()) == GROUP_PC) and outputs the result.

Update: looking at your original post, it seems you are adding-in to the main campaign. That makes possibility 2 and 3 unlikely, unless you aren't testing it within the main campaign.

Modifié par DavidSims, 12 décembre 2009 - 07:52 .